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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Find first and last day of current month in sql server

1007


Do you know what is normalization of database? What are its benefits?

1092


What are differences in between sql server 2012 and sql server 2016?

1022


What is implicit mode in sql server?

1076


what is bit datatype and what's the information that can be stored inside a bit column? : Sql server database administration

967


What are system databases in ms sql server?

1024


what are constraints? Explain different types of constraints? : Sql server database administration

956


How do I find the sql server version?

1000


What is exporting utility?

988


What are different type of Collation Sensitivity?

981


How can we delete a table in sql server?

955


What are the advantages of partitioning?

1083


What is difference between temp table and cte?

999


How to view existing indexes on an given table using sys.indexes?

1066


What does nvl stand for?

933