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
Find first and last day of current month in sql server
Do you know what is normalization of database? What are its benefits?
What are differences in between sql server 2012 and sql server 2016?
What is implicit mode in sql server?
what is bit datatype and what's the information that can be stored inside a bit column? : Sql server database administration
What are system databases in ms sql server?
what are constraints? Explain different types of constraints? : Sql server database administration
How do I find the sql server version?
What is exporting utility?
What are different type of Collation Sensitivity?
How can we delete a table in sql server?
What are the advantages of partitioning?
What is difference between temp table and cte?
How to view existing indexes on an given table using sys.indexes?
What does nvl stand for?