Question: Assuming all other tables are already created, write SQL statement to create the following tables and the given constraint 2. Assuming the table already exists,

 Assuming all other tables are already created, write SQL statement to create the following tables and the given constraint

2. Assuming the table already exists, write SQL statement to define a constraint in the Position table to ensure the column position does not accept duplicates

3. Assuming the table already exists with no existing Foreign Key, write SQL statement to create foreign key in table Invoice_Detail that refers to the corresponding column in the table Invoice

4. Write SQL statement to modify the Position table in order to define a constraint to ensure that the column position receives only values 'Sales Rep' or 'Manager'

5. Write single SQL statement to create table named new_Invoice exactly the same as Invoice with data

6. Add a new invoice for Customer ID 10 to the new_invoice table. For the rest of the columns use any fake data. Make sure you consider the type of each column when you add the values

7. Write SQL statement to change the value of the column Invoice_Date (new_invoice table) to today's date for Customer ID 10

8. Write SQL statement to remove all invoices from new_invoice table that belongs to Customer ID 10

9. Write SQL statement to remove tables new_invoice table from the database

10. Dispaly employee number, employee last name, and hire date for employees whose last name includes letter e and their position is "Sales Rep"

11. Display customer number, customer name, and location for customers whose Customer_name starts with letter C. Sort the result based on customer number.

12. Write SQL statement to display Invoice Number and total sale for each Invoice

Employee PK EmployeelD Emp_FName Emp_LName SOC_Ins FK Position ID FK Supervisor_ID HireDateAuthor PK Author_ID Author_FName Author_LName PK Customer_Number Customer_Name Customer Location FK Rep_ID

Employee PK EmployeelD Emp_FName Emp_LName SOC_Ins FK Position ID FK Supervisor_ID HireDate Author PK Author_ID Author_FName Author_LName PK Customer_Number Customer_Name Customer Location FK Rep_ID Position PK Position_ID Position Author_Product PK, FK1 PK, FK2 Author_ID Prod_ID Invoice PK Invoice Number Invoice_Date FK Customer_Number Invoice_Detail PK, FK1 PI, FK2 PK FK FK Invoice_Number Prod_ID Quantity Price Product Product ID Title_ID Edition_ID Purchase Cost Retail Price PK Title Title_ID Title Edition PK Edition_ID Edition

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!