SQL Create Table: Step-by-Step Guide
To create a data table in a database, you need to use SQL language to execute the operation of creating the table. Here is an example:
CREATE TABLE employees (
id INT PRIMARY KEY,
name VARCHAR(50),
age INT,
department VARCHAR(50)
);
In the above example, we created a data table named “employees” with fields for id, name, age, and department, specifying id as the primary key. By executing the SQL statement above, you can create a data table named “employees” in the database.