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 |
What are tables in sql server?
How would you use user_constraints table in DB?
What does ss stand for sexually?
What is user defined datatypes and when you should go for them?
Why use sub query in sql server and list out types of sub queries?
How will you hide an attribute? : sql server analysis services, ssas
How you can get a list of all the table constraints in a database? : Sql server administration
Is foreign key unique?
What is candidate key with example?
What is the difference between join and inner join?
Where can you find the error log information? : sql server database administration
List the data types available in mssql?