ORDINA BLOGT

XML in SQL Server - Inner join

There are a few ways to do inner joins from an XML column to another table.

  • 18 juli 2012

This is the easy way which delivers very good performance:
 select *
 from [table1] t1
 inner join [table2] t2
 on  t1.[XmlColumn.exist('/myrootelement/subelement[.=sql:column("t2.id")]') = 1