Answer: The PRIMARY KEY Constraint
Explore how to manage the PRIMARY KEY constraint in SQL. Learn to add, modify, and remove PRIMARY KEYs using ALTER TABLE and understand the importance of AUTO_INCREMENT in key management. Gain practical skills for interview questions on SQL constraints.
Solution
The solution is given below:
Explanation
The explanation of the solution code is given below:
Line 2: The
ALTER TABLEquery modifies a table. TheMODIFYclause specifies which column to modify. TheAUTO_INCREMENTsets the column to increase the number automatically when ...