Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can I create a table from another table without copying any values from the old table?

Answer Posted / amit kumar sharma

Select * into newTable From oldTable where 1=2

The where condition 1=2 will never get true, so only the
column of table will appear and get copied to newTable.

If we remove the where condition table with data will copy
to newtable.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a scrollable cursor with the scroll option?

980


What is @@rowcount in sql?

984


How many levels of sp nesting is possible?

1038


What does nvl stand for?

933


Which are ddl commands?

1028


Explain what are the events recorded in a transaction log?

989


create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration

939


How do clustered indexes store data?

1085


Explain syntax for viewing trigger?

904


How to connect sql server management studio express to sql server 2005 express?

1012


What is schemabinding a view?

906


Tell me what is log shipping?

961


How to create a user name in a database?

1031


how to control the amount of free space in your index pages? : Sql server database administration

1020


Explain syntax for viewing, dropping and disabling triggers?

931