Accessing Child node from xml data type

  • Rajesh.KB

    SSC-Addicted

    Points: 403

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

    🙂

  • Orlando Colamatteo

    SSC Guru

    Points: 182269

    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 2 (of 2 total)

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