Mega Code Archive

 
Categories / MSSQL Tutorial / Transact SQL
 

XML type variable

4> DECLARE @Book XML 5> SET @Book = 6> CAST('<Book name="SQL Server 2000 Fast Answers"> 7~ <Chapters> 8~ <Chapter id="1"> chapter 1 </Chapter> 9~ <Chapter id="2"> chapter 2 </Chapter> 10~ <Chapter id="3"> chapter 3 </Chapter> 11~ <Chapter id="4"> chapter 4 </Chapter> 12~  </Chapters> 13~  </Book>' as XML) 14> GO 1> 2>