Hands on exercise chapter 8 1) Create a new table that contains the category cod
ID: 3621679 • Letter: H
Question
Hands on exercise chapter 81) Create a new table that contains the category code and description for the categories of books sold by JustLee books. The table should be called Category. The columns should be called CatCode and CatDesc. The CatCode column should store a maximum of 2 characters, and the CatDesc column should store a maximum of 10 characters.
2) Create a new table that contains the following two columns: Customer# and Region. The name of the table should be CUSTOMERREGION. The Region column should be able to store character strings up to a maximum length of 4. The column values should not be padded if the value has less than 4 characters.
3) Add a column to the CUSTOMERSREGION table that will contain the date of the last order placed by each customer. The default value of the column should be the system date. The new column should be named LastODate.
4) Modify the region column of the CUSTOMERREGION table so that it will only allow a maximum width of 2 characters to be stored in the column.
5) Create a new table that contains the title of each book in the BOOKS table, its ISBN, the publisher ID, and the profit generated by each book. The name of the profit column should be Profit, and the other columns should keep their original names. Names the new table ProfitGeneratedPerBook.
6) Rename the ProfitGeneratedPerBook table to ProfitPerBook.
7) Delete the PubID column from the ProfitPerBook table.
8) Mark the Title column of the ProfitPerBook table as unused. Verify that the column is no longer available.
9) Truncate the ProfitPerBook table and then verify that the ProfitPerBook table still exists.
10) Delete the ProfitPerBook table.
Explanation / Answer
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.