Ich führe dieses SQL aus:
SELECT S.name as Owner, T.name as TableName FROM sys.tables AS T
JOIN sys.schemas AS S ON S.schema_id = T.schema_id
Und das Ergebnis ist:
Owner TableName
------------------------
dbo Person
dbo Customer
dbo sysdiagrams
sysdiagrams
es un system table
aber im Ergebnis gezeigt.
Aktualisierung: Vielen Dank für Ihre Antworten und Kommentare, ich verwende Nate Bolam & vmvadivel Antworten:
SELECT S.name as Owner, T.name as TableName
FROM
sys.tables AS T
INNER JOIN sys.schemas AS S ON S.schema_id = T.schema_id
LEFT JOIN sys.extended_properties AS EP ON EP.major_id = T.[object_id]
WHERE
T.is_ms_shipped = 0 AND
(EP.class_desc IS NULL OR (EP.class_desc <>'OBJECT_OR_COLUMN' AND
EP.[name] <> 'microsoft_database_tools_support'))