Basic SELECT Statement
Select *|{[DISTINCT] column|expression [alias],...}
FROM table;
. SELECT identifies what columns
. FROM identifies which table
Basic SELECT Statement
In its simplest form, a SELECT statement must include the following
. A SELECT Clause, which specifies the columns to be displayed
. A FROM clause, which specifies the table containing the columns listed in the SELECT clause
In the syntax:
SELECT is a list of one or more columns
* select all columns
DISTNICT suppresses duplicate
column/expression selects the named columns different headings
alias gives selected columns different headings
FROM table specifies the table containing the columns
Important Note:
. A Keyword refers to an individual SQL element.
For Example, SELECT and FROM are keywords.
. A clause is a part of SQL statement.
For Example, SELECT employee_id, last_name, .... is a clause.
. A statement is a combination of two or more clauses.
For Example, SELECT * FROM employees is a SQL statement.
FROM table;
. SELECT identifies what columns
. FROM identifies which table
Basic SELECT Statement
In its simplest form, a SELECT statement must include the following
. A SELECT Clause, which specifies the columns to be displayed
. A FROM clause, which specifies the table containing the columns listed in the SELECT clause
In the syntax:
SELECT is a list of one or more columns
* select all columns
DISTNICT suppresses duplicate
column/expression selects the named columns different headings
alias gives selected columns different headings
FROM table specifies the table containing the columns
Important Note:
. A Keyword refers to an individual SQL element.
For Example, SELECT and FROM are keywords.
. A clause is a part of SQL statement.
For Example, SELECT employee_id, last_name, .... is a clause.
. A statement is a combination of two or more clauses.
For Example, SELECT * FROM employees is a SQL statement.
0 Responses to "Basic SELECT Statement"
Post a Comment