blog.mindbirdsolutions.com
XML Data type in Microsoft SQL Server 2005 | Teck Trip from Mind Bird Solutions we design bangalore
Introduction: SQL Server 2005 supports a new data type named xml. The xml type can store either a complete XML document, or a fragment of XML, as long as it is well-formed prior to SQL Server 2005, developers often used VARCHAR or TEXT column types to store XML documents and fragments. Although this approach served well as far as data storage is concerned, it proved to be poor in terms of querying and manipulating the XML data. Create a table in an SQL Server database that contains a column of type XML. use master go IF(not exists (select * from dbo.sysdatabases where name='myTest')) BEGIN Create database myTest END GO USE myTest GO IF NOT( EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'Customers') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)) BEGIN CREATE TABLE Customers ( IDENTITY(1,1) NOT NULL, (64) NULL,