Sunday, June 14, 2015

Find table, view, stored procedure, etc list in database SQL Server

Use this query to find table list in database SQL Server:

SELECT * FROM information_schema.tables

Complete query for finding table, view, storedprocedure, key, etc

SELECT sobjects.name

FROM sysobjects sobjects

WHERE sobjects.xtype = 'U'


Object type:
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

Best Wishes,

LadyinProgramming



No comments:

Post a Comment