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 |
How to display a past time in days, hours and minutes?
How to receive returning result from a query?
How to write a query with a left outer join in ms sql server?
Please explain what is “asynchronous” communication in sql server service broker?
About DTS usage ?
Which command executes the contents of a specified file?
9. Write a query to list a new column with the difference in temp of the cities Delhi and Mumbai, Mumbai and Jammu and soon. Consider the following table : City_id City Temp. 1 delhi 40 2 Mumbai 35 3 Jammu 32 4 Pune 18
how you can move data or databases between servers and databases in sql server? : Sql server administration
What are SSL and TSL protocols?
Explain the concepts and capabilities of sql server?
What is a benefit of using an after insert trigger over using a before insert trigger?
PC(code, model, speed, ram, hd, cd, price) Find the hard drive sizes that are equal among two or more PCs.
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)