Accessing Child node from xml data type

  • Hi, How can i access a child node using a select query from sql server..

    🙂

  • DECLARE @x XML = N'<parent><child>Hello World!</child></parent>' ;

    SELECT @x.query('/parent/child') ;

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply