Creating table having structure same as that of existing table

27/08/2003 - 06:59 por Kuntal Kumar Sasan | Informe spam
Hi,

How can I create a table (need to create temporary table) having
structure same as that of an existing table. Only need is to create table,
no need of copying data along with it.

Thanx in advance,
K.K.
 

Leer las respuestas

#1 Emilio Boucau
27/08/2003 - 14:43 | Informe spam
You can issue a

SELECT * INTO New_Table FROM Source_Table WHERE 1=2

This statement will copy only the orig structure.

I kindly remind you to post in Spanish in the future, not in English.

-

Podes ejecutar

SELECT * INTO New_Table FROM Source_Table WHERE 1=2

Esta sentencia copiara solamente la estrucutra original.

Te pido que en el futuro hagas tus postas en castellano, no en ingles.

Saludos !

Emilio Boucau
Microsoft MVP SQL Server
http://www.portalsql.com
PASS Spanish Group
http://www.sqlpass.org

Buenos Aires - Argentina

Preguntas similares