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 existing customer table.
  • ADD CONSTRAINT pk_id: Adds a constraint named pk_id.
  • PRIMARY KEY (customer_id): Specifies that customer_id is the primary key column.

Therefore, the correct answer is C. It will add a primary key constraint column customer id in customer table.

SQL ALTER TABLE: Adding Primary Key Constraint

原文地址: https://www.cveoy.top/t/topic/nwVM 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录