Added several SQL language elements (#28167)
This commit is contained in:
committed by
Randell Dawson
parent
dc649f6f45
commit
c4bf3c1ff0
@ -11,6 +11,26 @@ However, SQL code can differ between the different variants. For example, Micros
|
|||||||
|
|
||||||
SQL is commonly pronounced "sequel." Its most popular variants are MySQL, PostgreSQL, and SQLite - a version of SQL which is commonly used for prototyping. It introduced the concept of accessing many records with one single command, using SQL Queries.
|
SQL is commonly pronounced "sequel." Its most popular variants are MySQL, PostgreSQL, and SQLite - a version of SQL which is commonly used for prototyping. It introduced the concept of accessing many records with one single command, using SQL Queries.
|
||||||
|
|
||||||
|
|
||||||
|
### Syntax
|
||||||
|
|
||||||
|
# The SQL language is subdivided into several language elements, including:
|
||||||
|
|
||||||
|
* Clauses, which are constituent components of statements and queries. (In some cases, these are optional.)
|
||||||
|
|
||||||
|
* Expressions, which can produce either scalar values, or tables consisting of columns and rows of data
|
||||||
|
|
||||||
|
* Predicates, which specify conditions that can be evaluated to SQL three-valued logic (3VL) (true/false/unknown) or Boolean truth values and are used to limit the effects of statements and queries, or to change program flow.
|
||||||
|
|
||||||
|
* Queries, which retrieve the data based on specific criteria. This is an important element of SQL.
|
||||||
|
|
||||||
|
* Statements, which may have a persistent effect on schemata and data, or may control transactions, program flow, connections, sessions, or diagnostics.
|
||||||
|
|
||||||
|
* SQL statements also include the semicolon (";") statement terminator. Though not required on every platform, it is defined as a standard part of the SQL grammar.
|
||||||
|
|
||||||
|
* Insignificant whitespace is generally ignored in SQL statements and queries, making it easier to format SQL code for readability.
|
||||||
|
|
||||||
|
|
||||||
SQL can be broken down further into DDL (Data Definition Language) and DML (Data manipulation Language).
|
SQL can be broken down further into DDL (Data Definition Language) and DML (Data manipulation Language).
|
||||||
|
|
||||||
DDL is the creating/editing the structure of tables. Functions include CREATE database/role/table/function/, DROP table/function, TRUNCATE table, ALTER table, RENAME table. You can also GRANT and REVOKE permissions to objects using DDL.
|
DDL is the creating/editing the structure of tables. Functions include CREATE database/role/table/function/, DROP table/function, TRUNCATE table, ALTER table, RENAME table. You can also GRANT and REVOKE permissions to objects using DDL.
|
||||||
|
Reference in New Issue
Block a user