The SQL command used to create base tables and define their attributes is "CREATE TABLE." This command allows you to specify the structure of the table, including the names and data types of the columns, any constraints (such as primary keys or unique constraints), and other attributes necessary for the data you intend to store.
Using "CREATE TABLE," you can establish the framework for how data is organized in a relational database. For instance, it might look something like this:
CREATE TABLE Employees (
EmployeeID INT PRIMARY KEY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
HireDate DATE
);
In this example, the command defines a table called Employees
with four attributes: EmployeeID
, FirstName
, LastName
, and HireDate
, including their respective data types.
The other commands listed serve different purposes, such as modifying existing tables, removing tables, or inserting data into existing tables, rather than creating new tables and defining their attributes.