sandoukhan
Crypto Gaming Pro
2
MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1
300 XP
After you create a database using the CREATE Database statement, you can now create a table. Table is where you store your data in your database.
SQL CREATE TABLE Syntax
Example # 1
Users
Firstname
Lastname
Salary
DeptID
This command will create an empty table with named "Users" and the data types for each column. Now we can populate the table by using SQL INSERT statements.
SQL CREATE TABLE Syntax
- CREATE
TABLE
TABLE_NAME
- (
- column_name1 data_type,
- column_name2 data_type,
- column_name3 data_type,
- ....
- )
Example # 1
- CREATE
TABLE
Users
- (
- Firstname text,
- Lastname text,
- Salary FLOAT
,
- DeptID INT
- )
Users
Firstname
Lastname
Salary
DeptID
This command will create an empty table with named "Users" and the data types for each column. Now we can populate the table by using SQL INSERT statements.