Complete Question 6 from these DML and DDL quries and show a
screenshot of the result.
Answer MUST have a screenshot.
Only do question 6.
Overview In this task, you will learn how to use DDL and DML (other than SELECT) statements. First, please delete EMPLOYEE and EMP tables if they exist in your database. DROP TABLE IF EXISTS EMPLOYEE; DROP TABLE IF EXISTS EMP; Tasks to do 1. Write an SQL statement create the EMPLOYEE table with the following attributes and constraints. As your answer to this question, please include (i) your SQL statement to create the EMPLOYEE table, and (ii) a screenshot of the result of the following SQL statement DESC EMPLOYEE;
2. Write an SQL statement to change the column name 'EMP_MGR' to 'EMP_MGR_NUM'. [Hint: ALTER TABLE to rename column, discussed in the class]. As your answer to this question, please include (i) your SQL statement to alter the EMPLOYEE table, and Page 1 of 3 (ii) a screenshot of the result of the following \( \mathrm{SQL} \) statement: DESC EMPLOYEE; 3. Write an SQL statement to ADD FOREIGN KEY CONSTRAINT to EMP_MGR_NUM to reference to EMP_NUM (self-reference). This column indicates who is the manager (EMP_NUM of the manager) of an employee. [Hint: ALTER TABLE to add constraint, discussed in the class] As your answer to this question, please include (i) your SQL statement to add the FOREIGN CONSTRAINT, and (ii) a screenshot of the result of the following SQL statement: = 'EMPLOYEE'; Note that the above SQL gives the constraints associated with the EMPLOYEE table.
4. Write SQL statements to insert the following records in the EMPLOYEE TABLE. As your answer to this question, please include (i) your SQL statements to insert the above records in the EMPLOYEE table, and (ii) a screenshot of the result of the following SQL statement: SELECT \( \star \) FROM EMPLOYEE; 5. Write an SQL statement to set the manager of Paul Wiesenbach (EMP_NUM \( =108 \) ) as George Kolmycz (EMP_NUM = 100).
As your answer to this question, please include (i) your SQL statement to update the manager num, and (ii) a screenshot of the result of the following SQL statement: SELECT \( \star \) FROM EMPLOYEE WHERE EMP_NUM \( =108 ; \) 6. Write an SQL statement to delete records of all employees managed by Paul Wiesenbach (EMP_NUM = 108). As your answer to this question, please include (i) your SQL statement to delete records, and (ii) a screenshot of the result of the following SQL statement: SELECT * FROM EMPLOYEE;