Posts

Showing posts from July 6, 2011

Using XML Datatype is SQL SERVER

The xml data type lets you store XML documents and fragments in a SQL Server database.  The below shows how to add a new column of XML datatype ALTER TABLE Employee ADD JobHistory XML The below shows how to Store the data in a XML column UPDATE Employee SET JobHistory= '< Job JobID="1" > < CompanyName>ABC Corp< /CompanyName> < Years>1< /Years> < /Job> ' WHERE EMPLOYEEID = 1