Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How to create a new table in SQL server 2000,2005 & 2008 from an existing table without copying the records from previous table?

user-image
Question ajoutée par Utilisateur supprimé
Date de publication: 2015/01/26
Shahid Abdul Azeem
par Shahid Abdul Azeem , Technical Lead IT Application/SAP HANA , Saudi Aramco Shell Refinery (SASREF)

You mean you just need to copy table with structure right:

if so create a table <newtable> as select * from oldtable and express the condition which does not meet.

ex.Create TABLE <NEWTAB>

AS (select * from OLDTAB where2<3)

Note:Use * for all Column 

Sarmad Jari
par Sarmad Jari , Senior Cloud Solution Architect , Microsoft

simple as this:

Select * Into newTable From oldTable Where1 =2;

VISWANATH LEELA KRISHNA
par VISWANATH LEELA KRISHNA , Database Administration , GULF BANK, KUWAIT

Select * Into<New Table> from <OldTable> where1=2;.

 

 

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?