Question: Using SQL statements. Given the following table descriptions, write a sql statement that will generate a foreign key constraint on the sales bid attribute that
Using SQL statements.
Given the following table descriptions, write a sql statement that will generate a foreign key constraint on the sales bid attribute that references the books bid attribute. MariaDB [ugc1201]> desc books; Field | Type | Null | Key | Default | Extra | | int(10) | YES 1 bid title | varchar (10) | YES | author | varchar(15) | YES subject | varchar(10) | YES 4 rows in set (0.006 sec) MariaDB [ugc1201]> desc sales; Field | Type sid | int (10) | YES | bid | int(10) | YES price | int (10) int (10) | YES 3 rows in set (0.006 sec) NULL NULL NULL NULL Null | Key | Default | Extra | NULL NULL NULL
Step by Step Solution
3.32 Rating (143 Votes )
There are 3 Steps involved in it
Syntax ALTER TABLE ADD CONSTRAIN... View full answer
Get step-by-step solutions from verified subject matter experts
