The del_stock.sql command file

The following command file deletes rows from the stock table where the stock number is 102. This delete will cascade to the catalog table (although the related manufacturer codes will remain in the manufact table). The del_stock.sql command file can be used following the alt_cat.sql command file for practice with cascading deletes on a database with logging.
DELETE FROM stock WHERE stock_num = 102;
After running the SQL statements in the alt_cat.sql and del_stock.sql command files, issue the following query on the catalog table to verify that the rows were deleted:
SELECT * FROM catalog WHERE stock_num = 102; 

The stores_demo database has been changed. You might want to rerun the dbaccessdemo script to rebuild the original database.


Copyright© 2018 HCL Technologies Limited