How can I get an XML Schema (XSD) from SQL Server?
Example: To retrieve the XSD for the 'Order' table you can run:
Select * from [order] where ID < 0 FOR XML AUTO, XMLSCHEMA
This will just return the XSD (as the where clause will not return any order records).
Labels: SQL Server, Transact SQL, XSD