DECLARE @XML1 XML
SET @XML1=SELECT XMLCOLUMN FROM TABLE WHERE ID='123-456'
when i do like this i am getting following error message:
Incorrect syntax near the keyword ‘SELECT’.
Could anyone please help me how to assign xmlcolumn value to xml variable.
Use
Or
They behave the same if the query returns exactly one row but differ otherwise.