BD: Sql server 2014
I have a table "User-defined Table Type" what I need is to copy its structure (columns) to a temporary table
BD: Sql server 2014
I have a table "User-defined Table Type" what I need is to copy its structure (columns) to a temporary table
Since there is not much information, I can recommend the following:
You can use insert select to copy all its structure and data from the table:
INSERT INTO #nuevatabla
SELECT * FROM origentabla;
If you want only the structure:
SELECT * Into #Nombredetabla
From TablaOrigen
Remember that #TablaTemporal is a local type and ##Temporal Table is a global type.