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 |
wat is the main diff between sql server 2000and sql server 2005
What are the new scripting capabilities of ssms? : sql server management studio
What is ms sql server index?
What is difference between inner join and full join?
What methods do you follow to protect from sql injection attack?
What is data source view or dsv? : sql server analysis services, ssas
explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration
Can we add our custom code in ssis?
Difference between Inner vs outer joins?
What are the differences between triggers and stored procedures?
What does select 1 mean?
What is the contrast between sql and mysql?