SELECT statement falls under DQL (Data Query Language ) of SQL. It is used to query or retrieve data from sql. Here is a sample table for use to practise. The table name is trees.
+-------------------------------------------+------------------------------------------+ SELECT * from trees; GENERIC SYNTAX below SELECT * from TABLENAMEThis is show all the columns and rows in table trees. If you want to see only specific columns you have to issue the sql command like this [GENERIC FORMAT] SELECT column1,column2 from TABLENAME column1 & column2 are column names in the table. SELECT PlotID,TreeTagNumber from trees; This command displays only PlotID and TreeTagNumber from above table. The output will be like this +------------------------------------OUTPUT------------------------------------------+
+-------------------------------------------+------------------------------------------+ |
Wednesday, December 31, 2008
SQL: The Select Statement tutorial 1
Posted by Basis-Consultant at 11:22 AM
Labels: ddl, select statement, sql
Subscribe to:
Post Comments (Atom)



0 comments:
Post a Comment