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

What is 3nf normalization?

924


what is an index? : Sql server database administration

931


What is a non-clustered index?

952


What is the federation in sql azure?

95


Does partitioning ssd reduce performance?

846


What is a subquery in a select query statement in ms sql server?

1066


How do you trace the traffic hitting a sql server?

1070


Explain external key management in sql server 2008

847


Can a database be shrunk with users active?

1063


Does partitioning improve performance?

917


what is an extended stored procedure? Can you instantiate a com object by using t-sql? : Sql server database administration

968


Tell me what are cursors and when they are useful?

909


What will be the maximum number of indexes per table?

907


i have made a project i vb.net n created a .exe of it after installing it in to any pc, the database (sql express) is not geting accesed i.e the aplication cuts the link of the database, so plz help in this matter.

1828


Can we run Reporting Services with SQL Server express edition, which is a free version of SQL Server?

112