SQL is a standard language for accessing databases.
You can use SQL to access and manipulate data in: MySQL, SQL Server, Access, Oracle, Sybase, DB2, and other database systems.
SQL (Structured Query Language) is a special-purpose used in programming and designed for managing data held in a (RDBMS), or for stream processing in a relational data stream management system (RDSMS).
SQL deviates in several ways from its theoretical foundation, the relational model and its tuple calculus. In that model, a table is a set of tuples, while in SQL, tables and query results are lists of rows: the same row may occur multiple times, and the order of rows can be employed in queries (e.g. in the LIMIT clause).
Critics argue that SQL should be replaced with a language that strictly returns to the original foundation: for example, see The Third Manifesto.
The SQL language is subdivided into several language elements, including:
- Clauses, which are constituent components of statements and queries.
- 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.
- Statements, which may have a persistent effect on schemata and data, or may control transactions, program flow, connections, sessions, or diagnostics.
- 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 statements and queries, making it easier to format code for readability.
SELECT * FROM Customers;