Sunday, April 8, 2012

SQL Server - List All Tables in Database

This can be achieved easily using the below command


Now what is xtype ?
It identifies the type of objects stored in your database. The codes mean :

  • U - User Tables
  • P - Stored Procedures
  • V - Views
  • S - System Tables
I recommend you have a look at 'Understanding SQL Server's sysobjects table' for further knowledge.

No comments:

Post a Comment