Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 4: SQL Statements (15) Write 10 SQL statements to solve the following requests: 1. Create a table named Employee with the following fields. Attribute
Question 4: SQL Statements (15) Write 10 SQL statements to solve the following requests: 1. Create a table named Employee with the following fields. Attribute Name emp_id firstName lastName city Data Type NUMBER(4) VARCHAR2(20) VARCHAR2(30) VARCHAR2(50) Constraints PRIMARY KEY Not null Not null Not null 2. Create a table named Order with the following fields: Attribute Data Type Notes Name order_id NUMBER(2) PRIMARY KEY orderno Number (30) Not null NUMBER(4) Foreign key emp_id orderdate Date Not null 3. Insert 5 records in each table 4. Delete records from table Employee where firstName contains the letter 'c'; 5. Update the lastName to be 'Ali' of employees who live in Madinah? 6. Add a new attribute called Age to the Employee table. 7. Change the lastName of emp_id 2 to Mahmoud. 8. Update the age of all employees in Table Employee 9. Find lastName of all employees with age greater than 15. 10. Find the details of all orders for employees who live in Madinah
Step 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