Complete the code to name a primary key constraint following the convention.
ALTER TABLE employees ADD CONSTRAINT [1] PRIMARY KEY (employee_id);The convention is to prefix primary key constraints with pk_ followed by the table name.
Complete the code to name a foreign key constraint following the convention.
ALTER TABLE orders ADD CONSTRAINT [1] FOREIGN KEY (customer_id) REFERENCES customers(customer_id);Foreign key constraints are named with the prefix fk_ followed by the referencing and referenced table names.
Fix the error in naming a unique constraint following the convention.
ALTER TABLE products ADD CONSTRAINT [1] UNIQUE (product_code);Unique constraints use the prefix uq_ followed by the table and column names for clarity.
Fill both blanks to name a check constraint following the convention.
ALTER TABLE employees ADD CONSTRAINT [1] CHECK (salary [2] 0);
Check constraints use the prefix chk_ followed by table and column names. The condition should ensure salary is greater than zero.
Fill both blanks to name a default constraint following the convention.
ALTER TABLE orders ADD CONSTRAINT [1] DEFAULT [2] FOR order_status;
Default constraints use the prefix df_ followed by table and column names. The default value is set without extra syntax after the column name.