Working with SQL Server Database Objects
More on Stored Procedures
ToyzUnlimited maintains the details of all branded toy products in SQL Server
2005 databases and is now using stored procedures for day-to-day tasks.
the stored procedures named PriceIncrease,
QtyOnHand and HeavyToys have been created, now write statements
to view the definition of the stored procedures using all these 3
approaches one by one:
sp_helptext system stored procedure
sys.sql_modules system view
2. Write statements to display the dependencies for each of the 3 stored
3. Change the procedures PriceIncrease and QtyOnHand such that they
will also display the newly updated values of price and quantity after the
updation of these columns have taken place through the stored
procedures mentioned above.
4. Write statements to create a stored procedure named
SpecificPriceIncrease that will increment the unitprice of given toys by
a given amount.
5. Modify the SpecificPriceIncrease stored procedure such that it
additionally returns the number of rows updated.
6. Modify the SpecificPriceIncrease stored procedure such that it calls the
HeavyToys stored procedure within it.
7. Implement error-handling mechanism for all the stored procedures
created so far.
8. Remove all the stored procedures that were created so far.
© 2007 Aptech Ltd
Page 1 of 1