SQL: How can i get the value of an attribute in XML datatype

后端 未结 3 1347
南旧
南旧 2020-12-11 14:55

I have the following xml in my database:


  

I\'m using something like thi

3条回答
  •  死守一世寂寞
    2020-12-11 15:05

    This should work:

    DECLARE @xml XML
    
    SET @xml = N''
    
    SELECT T.C.value('@language', 'nvarchar(100)')
    FROM @xml.nodes('email/account') T(C)
    

提交回复
热议问题