it's your's

How to read xml data in sql server using select clause?

We can read the xml data using select clause.

DECLARE @xml XML = '<colors> 

SELECT doc.col.value('value[1]', 'nvarchar(4)')
,doc.col.value('code[1]', 'nvarchar(4)')
FROM @xml.nodes('colors/color') doc(col)

Comments (3) -

  • James

    7/20/2018 10:18:39 PM | Reply

    I really would like to attempt look at your blog one day before! they just make people go and i kind of want to have that power, once again, amazing stuff! It is very useful information.Thanks for sharing here. I am glad to see this blog .I just appreciate you for that kind of effort. Thanks and keep posting some. Amazing article. I am so impressed. I think you have a great knowledge especially while dealings with such subjects. Feel free to surf  https://writeversity.com .Education contain different task like essay, assignment, research paper writing and many of the students cannot complete their task successfully within the time.  

  • bumbleholystone

    1/27/2019 7:38:51 AM | Reply

    Happy Glass is a casual physics-based puzzle game with hundreds of levels to unlock and solve. Your job is toraw a line, curve or a shape to direct water flows and make the glass filled up to beat a level and earn stars, or spin the wheel for a random number of coins. As you use ink to draw, the green bar reduces and your star rating goes down correspondingly.

  • Lodge jobs

    5/2/2019 11:25:38 AM | Reply

    I truly appreciate this post. I've been looking everywhere for this! Thank goodness I found it on Bing. You've made my day! Thx again!