Pages

Monday, November 17, 2014

Guidlines to write a SELECT statement



Basic SELECT statement:

SELECT *|{[DISTINCT] column|expression [alias],...}
FROM    table;

SELECT identifies the columns to be displayed
FROM identifies the table containing those columns

Writing SQL Statements:
•       SQL statements are not case-sensitive.
•       SQL statements can be on one or more lines.
•       Keywords cannot be abbreviated or split
across lines.
•       Clauses are usually placed on separate lines.
•       Indents are used to enhance readability.
•       In iSQL*Plus, SQL statements can optionally be terminated by a semicolon (;). Semicolons are required if you execute multiple SQL statements.
•       In SQL*plus, you are required to end each SQL statement with a semicolon (;).

No comments:

Post a Comment