i.e if you have tableA with columns that are UDT, you can
run
select * into tempdb..tableB
from yourdb..tableA
where 0=1 -- false value here simply will cause
-- empty table structure to be created
-- and underlying type of UDT col from
-- original table will be used.
go
use tempdb
exec sp_help tableB
go
Actually in my previous post I should note it is better to use #tableB as opposed to tempdb..tableB. The former is truly a temp table, while the latter will remain in tempdb until you drop it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.