Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using SQL in Oracle ACTIVITY #1 - CREATING TABLES AND INSERTING DATA 1. Create the DEPARTMENT table based on the following table instance chart. Ensure
Using SQL in Oracle
ACTIVITY #1 - CREATING TABLES AND INSERTING DATA 1. Create the DEPARTMENT table based on the following table instance chart. Ensure you give each constraint an appropriate name. Enter the syntax in a script called pigl.sgl. then execute the script to create the table. Confirm that the table is created. Column Name Id Name PK NN NN Key Type Nulls/Unique FK Table FK Column Number Data Type Length Varchar2 25 7 2. Insert the following records into the DEPARTMENT table. Id Name Finance 100 200 Accounting 300 Human Resources 400 Payroll . 3. Create the EMPLOYEE table based on the following instance chart. Ensure you give each constraint an appropriate name. Enter the syntax in a script called pla3.sal, and then execute the script to create the table. Confirm that the table is created. Column Name ID LAST_NAME FIRST_NAME DEPT_ID FK Key Type PK Nulls/Unique NN FK Table NN NN DEPARTMENT FK Column ID Number Varchar2 Number Data Type Length Varchar2 25 7 25 7 4. Modify the EMPLOYEE table to allow for longer employee last names (the field needs to allow 40 characters instead of 25). Confirm your modification. ACTIVITY #2 - VIEWS 5. Create a view called EMP_VU based on the employee number, employee name, and department number from the EMP table. 6. Display the contents of the EMP_VU view. 7. Using your view EMP_VU, enter a query to display all employee names and department numbers. 8. Delete the view EMP_VUStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started