Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using the SQL table information from this question: https://www.chegg.com/homewo

ID: 3915919 • Letter: U

Question

Using the SQL table information from this question:
https://www.chegg.com/homework-help/questions-and-answers/create-department-tables-based-following-column-name-id-name-data-type-number-varchar2-len-q30116538

- Add a comment to the DEPARTMENT and EMPLOYEE table definitions describing the tables. Confirm your additions in the data dictionary.
- Drop the LAST_NAME column from the EMPLOYEE table. Confirm your modification by checking the description of the table.
- Create the EMPLOYEE2 table based on the structure of the EMP table. Include only the EMPNO, ENAME, DEPT_ID columns. Name the columns in your new table ID, LAST_NAME, and DEPT_ID, respectively. Mark the DEPT_ID column in the EMPLOYEE2 table as UNUSED. Confirm your modification by checking the description of the table.
- Drop all the UNUSED columns from the EMPLOYEE2 table. Confirm your modifications by checking the description of the table.
- Add a table-level PRIMARY KEY constraint to the EMPLOYEE table using the ID column. The constraint should be named at creation.
- Create a PRIMARY KEY constraint on the DEPARTMENT table using the ID column. The constraint should be named at creation.

Explanation / Answer

1.

COMMENT ON TABLE    EMPLOYEE
IS    ‘Info of Employee’;
COMMENT ON TABLE    DEPARTMENT
IS    ‘Info of department’

SELECT COMMENTS FROM USER_TAB_COMMENTS;

2.
ALTER TABLE EMPLOYEE DROP COLUMN LAST_NAME;
DESCRIBE EMPLOYEE;

Dear, According to chegg one has to answer only one question. Please post them in different session.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote