Title - SQL statements Tags - sql
A statement is text that that a relational database recognises as a valid command.
Statements always end in a semicolon (;).
Statements consist of:
- Clauses
Clauses perform specific tasks in SQL. They are written in capital letters. They can also be referred to as commands.
E.g. In the following statement, CREATE TABLE is the clause and performs the task of creating a table from data in the relational database.
CREATE TABLE table_name ( column_1 data_type, column_2 data_type, column_3 data_type );
- Parameters
A parameter is a list of columns, data types, or values that are passed to a clause as an argument.
E.g. in the statement above, the parameter is a list of column names and the associated data type.
column_1 data_type
SQL statements can be any number of lines. A statement can be written all in one line, but it’s usually easier to read when the statement is split into multiple lines, as in the example above.
What is mean by ‘passed to a clause as an argument’?