@sex='Male',
@birthDate='1976-11-10';
Question 9:
Create a trigger named deleteAuthors for the delete statement on the "Authors" table so that when we call a delete statement to delete one or more rows from the "Authors" table, the system will automatically update the table Books to set AuthorID as NULL for all books of the deleted authors.
For example, if we call the following statement to delete 2 authors with AuthorID = 1 and AuthorID = 2 from the "Authors' table, all the books of these two authors will be updated so that the AuthorID of these books will be NULL.
delete from Authors where AuthorID in (1,2)
Question 10:
Write statement to update the GenreID of the book named 'The Castle' so that this book will belong to the genre named 'Romance'
Zoom
+ 75%
Close