A select statement is used to select information from one or more tables. SQL statements can be on one or more lines. SQL is not case sensitive. SELECT is the same as select. SQL SELECT Syntax.
SELECT column_name(s) FROM table_name OR SELECT * FROM table_name
If all columns of a table should be selected, the asterisk symbol * can be used to denote all attributes. The query retrieves all tuples with all columns from the table EMP. To illustrate the usage of the SELECT command we are going to use the EMP table:
If the User is interested to finds the specified columns from a table are specified by keyword Select. SELECT identifies what columns. This operation is also called projection. The SQL statement below shows a simple usage of the SQL SELECT command with columns:
SELECT ENAME, SAL, EMPNO FROM EMP;
The SQL query starts with the SELECT keyword followed by a number of columns. This number of Columns specifies which columns you want to retrieve from your table. The list of columns is followed by the SQL keyword FROM and the table name (the table we are selecting data from).
Instead of an attribute name, the select clause may also contain arithmetic expressions involving arithmetic operators etc. For Example
SELECT 2+2 FROM DUAL;