Which of the following is a better performing query?
--query a
Select *
UserDefXml.query('/Product/ProductName/text()')
From ProductsDB.dbo.ProductsTable
--query b
Select *
UserDefXml.value('(/Product/ProductName)[1]','varchar(max)')
From ProductsDB.dbo.ProductsTable
What are the recommended scenarios for each of these? Are there any other ways to accomplish this?
Thank you.