Here’s a simple way of listing all tables and Views with the XML datatype using the INFORMATION_SCHEMA views.
SELECT DISTINCT col.TABLE_NAME, col.COLUMN_NAME, col.DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS as col
WHERE col.DATA_TYPE = 'xml'
As given in the Books Online “Information schema views provide an internal, system table-independent view of the SQL Server metadata. Information schema views enable applications to work correctly although significant changes have been made to the underlying system tables. The information schema views included in SQL Server comply with the ISO standard definition for the INFORMATION_SCHEMA.”
OUTPUT
No comments:
Post a Comment