SQL Server Admin
T-SQL Articles

September 26, 2009

List All Tables and Views with the XML Data Type in SQL Server 2005/2008




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

image


Did you like this post?
kick it on DotNetKicks.com
subscribe via rss subscribe via e-mail
print this post follow me on twitter



 
  Feedback:

comments

0 Responses to "List All Tables and Views with the XML Data Type in SQL Server 2005/2008"
 

Copyright © 2009-2011 All Rights Reserved for SQLServerCurry.com by Suprotim Agarwal | Terms and Conditions