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

optimization techinques

0 Answers   Wipro,


How to access the deleted record of an event?

0 Answers  


What are “phantom rows”?

0 Answers  


if a parameter is not send to a stored procedure what type of identifier is to be used in Stp and if that parameter is not feed to the a query inside the Stp how to validate with out useing IF condition

1 Answers   Aviva,


Where is SQL Srever (In sQL server 2005/2008 where is SQL Server Located).

2 Answers   TCS,


Do you know hot add cpu in sql server 2008?

0 Answers  


How to set database to be read_only in ms sql server?

0 Answers  


what is difference between primary key and Unique

8 Answers  


What is the difference between Stored Procedure , Function and Package, 1. how many blocks in Package and what are they.

5 Answers   IBM,


What is the default server name for sql server?

0 Answers  


What are the differences between DDL, DML and DCL in SQL?

0 Answers   ABB, Aspire, Infogain,


What is DAC? what is the use of it?

1 Answers   Wipro,


Categories