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...


Creating Tables Using SELECT



Creating Tables Using SELECT..

Answer / mohammadali.info

*SELECT...INTO essentially combines CREATE TABLE and SELECT in a single statement. The AS clause can be used to change the column labels and thus control the column names in the new table. The other commands in the figure show the new table's structure and contents.

-SELECT firstname, lastname, city, state
INTO newfriend
FROM friend;

-SELECT...INTO tablename can also be written as CREATE TABLE tablename AS SELECT.... The preceding query can then be rewritten as
CREATE TABLE newfriend AS SELECT firstname, lastname, city, state FROM friend.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More SQL Server Interview Questions

How to provide Security for package?

1 Answers   Convergys,


What is the joins and how many types of Joins in sql server a diffrentiate ever one give a suaitable query

2 Answers   Apollo,


How to replace the Query Result 'Null Value' with a text ?

0 Answers   MCN Solutions,


Which trace flags are enabled in sql server?

0 Answers  


What is exporting and importing utility?

0 Answers  


What are the difference between clustered and a non-clustered index?

0 Answers  


Explain magic tables in sql server?

0 Answers  


Why would you call update statistics?

0 Answers  


Hi Can any one tell me the Good institute to learn SQL esp for Data Base Testing or SQL from scratch to the proficiency level in Hyederabad and facult also. Thankyou well in advance

6 Answers  


Explain the phases a transaction has to undergo?

0 Answers  


How to update muliple row in single query?

0 Answers   MCN Solutions,


Do you know what is user defined datatypes and when you should go for them?

0 Answers  


Categories