zaagan
8/22/2019 - 2:10 AM

MS SQL For XML Syntax

MS SQL For XML Syntax

FOR XML
 {   
      { RAW [ ('ElementName') ] | AUTO }   
        [   
           <CommonDirectives>   
           [ , { XMLDATA | XMLSCHEMA [ ('TargetNameSpaceURI') ]} ]
           [ , ELEMENTS [ XSINIL | ABSENT ]   
        ]  
      | EXPLICIT   
        [   
           <CommonDirectives>   
           [ , XMLDATA ]   
        ]  
      | PATH [ ('ElementName') ]   
        [   
           <CommonDirectives>   
           [ , ELEMENTS [ XSINIL | ABSENT ] ]  
        ]  
     }   
  
<CommonDirectives> ::=   
 [ , BINARY BASE64 ]  
 [ , TYPE ]  
 [ , ROOT [ ('RootName') ] ]