Hello there
I want to know if there is a way in sql server to query the list of
objects in a user DB. especially tables.
thanks
SELECT *
FROM information_schema.tables
WHERE TABLE_TYPE = 'BASE TABLE'
AND OBJECTPROPERTY(OBJECT_ID(TABLE_NAME), 'IsMSShipped') = 0
Keith
"Simo Sentissi" <simo@.sentissiweb.com> wrote in message
news:e3ZU196rEHA.3608@.TK2MSFTNGP14.phx.gbl...
> Hello there
> I want to know if there is a way in sql server to query the list of
> objects in a user DB. especially tables.
> thanks
|||Use information_schema views.
Example:
select * from information_schema.tables where
objectproperty(object_id(table_name), 'IsUserTable') = 1
mk:@.MSITStore:C:\Program%20Files\Microsoft%20SQL%2 0Server\80\Tools\Books\tsqlref.chm::/ts_ia-iz_4pbn.htm
AMB
"Simo Sentissi" wrote:
> Hello there
> I want to know if there is a way in sql server to query the list of
> objects in a user DB. especially tables.
> thanks
>
|||http://www.aspfaq.com/search.asp?q=schema:&type=ALL
http://www.aspfaq.com/
(Reverse address to reply.)
"Simo Sentissi" <simo@.sentissiweb.com> wrote in message
news:e3ZU196rEHA.3608@.TK2MSFTNGP14.phx.gbl...
> Hello there
> I want to know if there is a way in sql server to query the list of
> objects in a user DB. especially tables.
> thanks
No comments:
Post a Comment