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
Explain the purpose of indexes?
Why use “pivot” in sql server?
Explain the dbcc pintable command when would you use it?
Do you know exporting and importing utility?
Tell me what is the order in which the sql query is executed?
When multiple after triggers are attached to sql table, how to control the order of execution?
What is user defined stored procedures?
What are the difference between clustered and a non-clustered index?
What is sql sandbox in sql server?
what is checksum in sql server.........???
List out the difference between union and union all in sql server?
What are the new features of sql server 2008 r2 reporting service?
What is the cartesian product of table?
What are the restraints imposed on the table design by a merge replication?
How to optimize stored procedures in sql server?