clear markdown help donate comments/suggestions/bugs a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith?
By using dbfiddle, you agree to license everything you submit by Creative Commons CC0

create table T(ID int, X xml); insert into T(ID, X) values(1, '<X>1</X>'); insert into T(ID, X) values(2, '<X>1</X>');
2 rows affected

select T.ID, TX.X.value('text()[1]', 'int') as X from T cross apply T.X.nodes('X') as TX(X);
ID X
1 1
2 1