I'm trying to get a list of all tables in a given database using:
USE DDMCONFIG
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'
I wonder what is the meaning of dtproperties table which figures with the rest of my tables list?
Thanks for any help
Best regards
ChrisYou can exclude non-user objects by checking the 'IsMSShipped' object
property like the example below. The dtproperties table is used by SQL
Server to store database diagrams.
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE' AND
OBJECTPROPERTY(
OBJECT_ID(
QUOTENAME(TABLE_SCHEMA) + '.' +
QUOTENAME(TABLE_NAME)
), 'IsMSShipped') = 0
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Krzysztof Kazmierczak" <krzysztof@.NO_SPAMsmartsolutions.pl> wrote in
message news:358CCDF2-7E2F-4861-846B-199ADA3BEA30@.microsoft.com...
> I'm trying to get a list of all tables in a given database using:
> USE DDMCONFIG
> SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'
> I wonder what is the meaning of dtproperties table which figures with the
rest of my tables list?
> Thanks for any help
> Best regards
> Chris|||Dan, thanks a lot for your help ;
Best regard
Chris|||I'm glad I was able to help.
--
Dan Guzman
SQL Server MVP
"Krzysztof Kazmierczak" <krzysztof@.NO_SPAMsmartsolutions.pl> wrote in
message news:7AA7FB6B-C3BA-482A-97DE-5F4B9FC27BD4@.microsoft.com...
> Dan, thanks a lot for your help ;)
> Best regards
> Chris
Friday, February 24, 2012
dtproperties table
Labels:
database,
ddmconfig,
dtproperties,
information_schema,
microsoft,
mysql,
oracle,
select,
server,
sql,
table,
table_type,
tables
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment