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 |
Why are you getting errors when creating a new odbc dsn?
What is page in sql server?
How to get a list of columns using the "sys.columns" view in ms sql server?
Explain the properties of sub-query in sql server?
How many index can be created for single table
4 Answers CarrizalSoft Technologies, Verizon,
Where are stored procedures in sql server?
Which sql server table is used to hold the stored procedure script?
Explain syntax for disabling triggers?
how to select a field with firstletter as capital and remaining are small letters
Explain syntax for dropping triggers?
why SQL server is more used to store database rather than Access
can you anybody tell me the how can you restore the master database. while migraion(one server to onther server)?
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)