Before you delete objects, make sure you are in the correct database:
Use the REVOKE statement to remove execute permission for Mary on the stored procedure:
DROP statement to remove permission for Mary to access the TestData database:DROP statement to remove permission for Mary to access this instance of [!INCLUDEssVersion2005]:DROP statement to remove the store procedure pr_Names:```sql
DROP PROC pr_Names;
GO
```
Use the DROP statement to remove the view vw_Names:
Use the DELETE statement to remove all rows from the Products table:
Use the DROP statement to remove the Products table:
You cannot remove the TestData database while you are in the database; therefore, first switch context to another database, and then use the DROP statement to remove the TestData database:
This concludes the Writing Transact\-SQL Statements tutorial. Remember, this tutorial is a brief overview and it does not describe all the options to the statements that are used. Designing and creating an efficient database structure and configuring secure access to the data requires a more complex database than that shown in this tutorial.