SQL ALTER TABLE: Adding Primary Key Constraint
The SQL statement ALTER TABLE customer ADD CONSTRAINT pk_id PRIMARY KEY (customer_id) will add a primary key constraint to the customer table, ensuring that the customer_id column is unique and not null.
Explanation:
ALTER TABLE customer: Modifies the existingcustomertable.ADD CONSTRAINT pk_id: Adds a constraint namedpk_id.PRIMARY KEY (customer_id): Specifies thatcustomer_idis the primary key column.
Therefore, the correct answer is C. It will add a primary key constraint column customer id in customer table.
原文地址: https://www.cveoy.top/t/topic/nwVM 著作权归作者所有。请勿转载和采集!