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
What are the dis_advantages of stored procedures, triggers, indexes?
How would you go about developing a ssrs report?
Why do we use functions?
Can sql servers linked to other servers?
What is application role in sql server database security? : sql server security
What are the instances when triggers are appropriate?
How to divide query output into multiple groups with the group by clause in ms sql server?
What is read committed?
How to include text values in sql statements?
What is the use of commit?
What is the use of tempdb? What values does it hold?
Explain full-text indexing?
How many categories of functions based their return modes?
What is tempdb in sql server?
Differentiate between a local and a global temporary table?