Microsoft® SQL Server™ 2008 All-In-One Desk Reference For Dummies®
by Robert D. Schneider, Darril Gibson
Chapter II.5. Looking After Your Tables
With your database and all related tables created, you might think it's time to sit back, relax, and put your feet up on the desk: Everything is on autopilot from here. Perhaps you're right; everything might be fine in your world. However, reality rarely plays out this way. There's a good chance that you'll periodically need to modify some tables. It's also likely that you'll need to delete a table from time to time. If nothing else, you'll at least want to get a comprehensive list of all the tables in your database.
This chapter is about taking good care of your tables after you've created them. To begin, we show you how to get a list of all the tables present in a database, view their data, and make sense of the details about each one. This is where you see how to determine whether there are any dependencies to consider. After you have a list of all your tables, you find out how to view and understand the characteristics of a given table. Next, we walk you through the often-necessary task of deleting a table. Finally, because you may be more of a command-line administrator, we show you how to achieve all these tasks by using the SQLCMD utility.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access