Creating Tables Using SELECT
Answer / 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 |
explain different levels of normalization? : Sql server database administration
Can we move Resource database from one path to another? If yes,How can we?
How to create a large table with random data for index testing in ms sql server?
How to stop a loop early with break statements in ms sql server?
What is ms sql server service broker?
How to delete an attribute from the emp table
Determine when an index is appropriate?
What is outer join in sql server joins?
Explain the difference between functions and stored procedures in sql server?
What is the difference between Triggers and Stored Procedure?
how can you check the level of fragmentation on a table? : Sql server administration
Explain for xml explicit mode?