In a FOR XML clause, you specify one of these modes: RAW - generates a single <row> element per row in the rowset that is returned by the SELECT statement AUTO - generates nesting in the resulting XML by using heuristics based on the way the SELECT statement is specified EXPLICIT - provides the most flexibility in generating the XML PATH - a simpler alternative to writing EXPLICIT mode queries Examples for RAW: Query 1: Basic SELECT doc_id , media_id FROM DOC FOR XML RAW Result 1: <row doc_id="114" media_id="-117" /> <row doc_id="115" media_id="-113" /> Query 2: Using Customized name instead of "row" in the result SELECT doc_id , media_id FROM DOC