Copy structure of table type [closed]

0

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

    
asked by DEVJ 26.05.2017 в 01:05
source

1 answer

2

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.

    
answered by 26.05.2017 в 01:13