Create SQL Table with Primary Key
CREATE TABLE Student ( ID INT NOT NULL, First_Name VARCHAR(50) NOT NULL, Last_Name VARCHAR(50) NOT NULL, PRIMARY KEY(ID) );
- The T-SQL code above will create the database table Student.
- The Student table has 3 columns: ID, First_Name, and Last_Name
- The Student table has a PRIMARY KEY: ID