Saturday, April 6, 2013

How To Get All Table Names In A Database Using sql.

Here Is The Best Way To Get All Table Names , Procedure Names , Views etc.., Using Following Query.



SELECT sobjects.name
FROM sysobjects sobjects
WHERE sobjects.xtype = 'U'

And For Other Object Types


C    : Check constraint
D    : Default constraint
F     : Foreign Key constraint
L     : Log
P     : Stored procedure
PK  : Primary Key constraint
RF  : Replication Filter stored procedure
S     :System table
TR   : Trigger
U     : User table
UQ  : Unique constraint
V     : View
X     : Extended stored procedure

No comments:

Post a Comment