How can I list out all table name of within a schema in MSSQL2005?
In Oracle, I can run this SQL to get all table_name or object_name of a users.
SQL:
SELECT TABLE_NAME FROM USER_TABLES;
SELECT TABLE_NAME FROM DBA_TABLES WHERE OWNER='<DB_USERNAME>';
SELECT OBJECT_NAME FROM USER_OBJECTS;
SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE OWNER='<DB_USERNAME>';
How to do it in MSSQL2005? any SQL cmd to execute to get the table / object list?
How to do it in MS SQL Server management studio?
I wanna have a list of table / objects under a schema by one action/script, but I DO NOT wanna to use MS SQL server management studio, check table / object name one by one.
Thanks.
Yes .. It is possible...
Select * from INFORMATION_SCHEMA.TABLES where table_schema='dbo'
No comments:
Post a Comment