XML Schema Creation in SQL Server 2005

Here’s an interesting approach for creating a quick and dirty schema to get you started with XML.

DECLARE @schema xml
SET @schema = (SELECT * FROM schema.TABLE FOR XML AUTO, ELEMENTS,
XMLSCHEMA('SchemaName'))
SELECT @schema

I don’t have the source, but I have where I found┬áit.

This entry was posted in SQL Toolbox and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *