Solved

Select into table

Posted on 2006-11-06
4
1,161 Views
Last Modified: 2008-03-04
Is it possible to do a select statement that creates a NEW table?

SELECT * FROM TABLE ONE INTO NEW TABLE ?
0
Comment
Question by:K3HT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 30

Accepted Solution

by:
todd_farmer earned 500 total points
ID: 17883463
CREATE TABLE new_table AS SELECT * FROM old_table;
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17883528
I think the AS is not correct in mysql:

http://dev.mysql.com/doc/refman/5.0/en/create-table.html
CREATE TABLE new_table SELECT * FROM old_table;
0
 
LVL 33

Expert Comment

by:snoyes_jw
ID: 17883565
It's in the documentation, and a quick test shows that it works.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17883596
I stand corrected. I did not see the  [AS] in the definition of the "select statement" ...
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question