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

Is foreign key unique?

0 Answers  


What do you mean by data manipulation language?

0 Answers  


If any stored procedure is encrypted, then can we see its definition in activity monitor?

0 Answers  


Explain the purpose of indexes?

0 Answers  


What is data mart? : sql server analysis services, ssas

0 Answers  


What is the difference between char, varchar and nvarchar?

0 Answers  


What stored procedure can you use to display the current processes?

0 Answers  


how to select 5 to 7 rows from a table, which contains 10 rows?

21 Answers   IBM,


What do you mean by data integrity?

0 Answers  


Explain the benefits of user-defined functions?

0 Answers  


What is the purpose of self join?

0 Answers  


When do you create cluster and noncluster index?

5 Answers   Satyam,


Categories