Question
--1a. Write a SQL statement that create a database and then drop the database. --1b. Write a SQL statement that create a table Employee, columns
--1a. Write a SQL statement that create a database and then drop the database.
--1b. Write a SQL statement that create a table Employee, columns should be EmployeeID which is in integer type, Last Name and First Name in varchar type, age in integer type. Make sure EmployeeID is the key and every employee is older than 21 year-old.
--1c. Write a SQL statement that insert the following values into 1b.table, explain which row cannot be inserted into the table and why. (001, Jason Unwin, 20) (001, Jason Unwin, 22) (001, James Unwin, 33) (002, John Unwin, 20) (002, Jason Unwin, 26)
--2. Write a SQL statement that explain the differences between DELETE, DROP and TRUNCATE
--3. Write a SQL statement that define a procedure which contains 1b and 1c, and run it.
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