..


Sponsored Links

CREATE TABLE

The CREATE TABLE statement of 'SQL DDL creates a physical table, the accompanying fields, their types of data and other properties.

The syntax is as follows:






 CREATE TABLE table_name







 (



    



 field_name datatype obbligatorio_si_no







 )



Basically you specify below the field name, data type and specify whether it is mandatory or not with the NULL keyword and / or NOT NULL.

Let's see an example of creating a table:





 CREATE TABLE books







 (



    



 id autoincrement,



    



 rif_autore Integer



    



 title text NOT NULL,



    



 Currency prices







 )



The list of fields can also be written on one line, separating them with commas.

Attention: the data types are valid for example MS Access, see the guides of the individual (R) DBMS, specifically the lessons on data types, SQL DDL to implement this statement on other products.

In the same category ...
E-Learning
MS Access (Advanced) MS Access (Advanced)
Learn how to create and manage databases quickly and easily. Starting from 29 €.
MySQL (Course) MySQL (Course)
Management of open-source database. From 39 €.
SQL and Database (Course) SQL and Database (Course)
Create and manage relational databases. From 39 €.
Sponsored Links