Answered step by step
Verified Expert Solution
Question
1 Approved Answer
An Employee has an employee id, first name, last name, gender, date of birth, Social Security and can manage multiple projects which have a project
An Employee has an employee id, first name, last name, gender, date of birth, Social Security and can manage multiple projects which have a project id, description, status, start date and projected end date. a. Write the SQL Script to create tables named EMPLOYEE and PROJECT given the description above. The names, gender, SSN, project status and project description are strings, the kids are numbers and the rest are dates. Use the appropriate SQL Data types. The PROJECT table has an additional column named Manager which will contain the ID of the employee which manages the project. b. Given that the two tables have been created, write SQL statements to insert 2 records into the Employee table and 4 records into the Project table. Two of the projects must be managed by the same employee. c. Write a SQL statement to retrieve the first and last name of the employees which manage 2 or more projects. d. Delete all the employees who have been born before Aug 1^st, 1970 and have an SSN starting with 522. To verify the results, first insert some sample data to delete
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