Question: write sql statement to create a table from the given tables which has a foreign key from Dept table and need to describe the options
Consider the following tables/relations of a company and answer the following question. Emp(eid: int, ename: varcahar(20), age: int, salary: float) Works(eid: int, dept_id: int, pcttime: int) Dept(dept_id: int, dname: varchar(20), budget: float, managerid: int) Give an SQL example of a foreign key constraint that involves the Dept relation (Create a table from the above relations which involves a foreign key referring to the Dept relation). What are the options for enforcing a referential integrity constraint when a user attempts to delete a record/tuple from Dept table
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
