SQL Server - Checking the existence of an XML Schema Collection



Checking whether the XML Schema Collection exists or not

-- XML Schema Collection Name: OrderInfo
IF EXISTS(
	SELECT * 
	FROM sys.xml_schema_collections 
	WHERE name = 'OrderInfo'
) 
BEGIN
	PRINT 'Schema Collection Exists'
END ELSE BEGIN
	PRINT 'Schema Collection Does Not Exist'
END

Share |

 Cant find the page you are looking for?
 Help us to improve by adding the content that you are looking for.
 Leave a feedback
 We look forward to hear your comments and feedback.