While creating a table 'items' Smina forgot to set the primary key. Give the statement which she should write now to set the column 'item id' as the primary key of the table?
Answers
Answered by
1
Answer:
ALTER TABLE ITEMS
ADD PRIMARY KEY ('Item Id');
Explanation:
You need to alter the table while setting up the primary key, moreover, when the table is created and contains data, and the column you want to make primary key, should contain unique value and non-null data. Otherwise you have to filter out the rows before Altering the table. Its always best practice to add Primary Key at the starting, so that no duplicates or non-null are not inserted in the table.
Similar questions
Social Sciences,
2 months ago
Chemistry,
2 months ago
Social Sciences,
2 months ago
Chemistry,
4 months ago
Math,
4 months ago
English,
10 months ago
Math,
10 months ago
English,
10 months ago