Tuesday, 28 August 2012

Writing SQL Commands

SQL statements consist of reserved words and user defined words
  • Reserved words are a fix part of SQL and must be spelled  exactly as required and cannot be split across lines.
  • User-defined words are made up by user and represent names of various database objects such as relations, columns, views.
  • Most component of an SQL statement are case insensitive except for literal character data.
  • Good SQL Style:
    • Each clause should begin on a new line
    • Start of a clause should line up with start of other clauses
    • If a clause has several parts, each should appear on a separate line and be indented under the start of the clause.

No comments:

Post a Comment