May 12, 2005 at 4:04 am
May 12, 2005 at 4:32 am
SELECT * FROM INFORMATION_SCHEMA.TABLES
May 12, 2005 at 4:46 am
i would go for what cris has done, pretty nifty, but here are other options using sp, this is pretty nice sp. look it up msdn BOL
use northwind
go
sp_tables null,dbo, null, "'TABLE'"
go
sp_tables null,dbo, null, "'TABLE', 'VIEW'"
go
sp_tables
--hope this helps
May 12, 2005 at 5:04 am
an addition to this just in case you want to manipulate the data
--DROP TABLE #QUERY
CREATE TABLE #QUERY
(
TABLE_QUALIFIER VARCHAR(100) NULL,
TABLE_OWNER varchar(100) NULL,
TABLE_NAME varchar(100) NULL,
TABLE_TYPE varchar(100) NULL,
REMARKS VARCHAR(100) NULL
)
GO
INSERT INTO #QUERY EXEC sp_tables null,dbo, null, "'TABLE', 'VIEW'"
go
SELECT * FROM #QUERY
May 12, 2005 at 10:38 pm
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply