The SQL statements -- SQL BEGIN declare @x xml set @x = (select DOC.query('for $c in //country return $c') from Mondial_Version3) select Temp.c.query('name/text()') as CountryName into Country from @x.nodes('/country') as Temp(c) -- SQL END generate the table Country(CountryName).