Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SELECT ... INTO

Status
Not open for further replies.

MvP14

Technical User
Joined
Apr 14, 2003
Messages
13
Location
BE
Hi,

can anyone tell me whether I can use the SELECT ... INTO command to enter the results of a temporary query1 into a a to be created table1 and if yes, how?
 
Your question is somewhat unclear, especially at the end.

Code:
SELECT *
   INTO mc
   FROM query1

can be used to create a new table mc with the contents of query1.

To insert data into an existing table named ot, use this

Code:
insert into ot(column_list) select column_list from query1
 
Thank you. That helped me out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top