Complete the code to declare a primary key on the 'id' column.
CREATE TABLE users (id INT [1], name VARCHAR(100));
The PRIMARY KEY constraint uniquely identifies each record in the table.
Complete the code to declare a primary key on the 'order_id' column in this table.
CREATE TABLE orders (order_id INT [1], order_date DATE);The PRIMARY KEY constraint ensures each order_id is unique and not null.
Fix the error in this table creation by correctly declaring the primary key.
CREATE TABLE products (product_id INT, name VARCHAR(50), [1] (product_id));
The PRIMARY KEY constraint must be declared to uniquely identify product_id.
Fill both blanks to declare a composite primary key on 'student_id' and 'course_id'.
CREATE TABLE enrollments (student_id INT, course_id INT, [1] (student_id, [2]));
A composite primary key uses PRIMARY KEY and lists both columns inside parentheses.
Fill all three blanks to declare a primary key on 'id' and add a unique constraint on 'email'.
CREATE TABLE users (id INT [1], email VARCHAR(100) [2], [3] (email));
The 'id' column is declared as PRIMARY KEY, 'email' column has a UNIQUE constraint, and the table-level unique constraint is declared on 'email'.