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 many types of the database links?

1062


What does Master database contains?

1122


Does a sql server 2005 select statement require a from?

1011


Explain the difference between delete,drop and truncate in SQL Server?

1087


What do you mean by an execution plan? Why is it used?

1005


Differentiate between sql temp table vs table variable?

872


what is isolation level at dead lock?

2141


List out some of the requirements to set up a sql server failover cluster?

1024


What do you mean by a dependent functionality in a build?

1128


How many database files are there in sql server 2000?what are they?

1042


What is bookmark link in ssrs?

244


Are resultset updatable?

944


Tell me the phases a transaction has to undergo?

955


What does this statement do @@rowcount?

959


How to enter binary string literals in ms sql server?

1141