Query (i): Enforce primary key constraint on the P_id column.
ALTER TABLE Projects
ADD PRIMARY KEY (P_id);
Explanation:
The ALTER TABLE statement is used to modify a table's structure.
The ADD PRIMARY KEY clause designates the P_id column as the primary key, ensuring unique identification for each record.
Query (ii): Update the project with ID P002 to use Python.
UPDATE Projects
SET Language = "Python"
WHERE P_id = "P002";
Explanation:
The UPDATE statement modifies existing records.
The SET clause changes the
Language column to "Python" for the record where P_id is "P002".
The WHERE clause targets this specific record for the update.
Query (iii): Remove the Projects table and all its data.
DROP TABLE Projects;
Explanation:
The DROP TABLE statement permanently deletes the Projects table, including all its data and structure.
This operation is irreversible; exercise caution.