Basic SELECT Statement
SELECT *|{[DISTINCT] column|expression [alias],...} FROM table;
SELECT identifies the columns to be displayed.FROM identifies the table containing those columns.
Selecting All Columns
SELECT * FROM departments;
Selecting Specific Columns
Writing SQL Statements(Conventions)
- SQL statements are not case-sensitive.
- SQL statements can be entered 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 SQL Developer, SQL statements can optionally be terminated by a semicolon (;).
- Semicolons are required when you execute multiple SQL statements.
- In SQL*Plus, you are required to end each SQL statement
with a semicolon (;).
Comments
Post a Comment