[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

phpmyadmin

Posted on 2011-09-02
4
Medium Priority
?
338 Views
Last Modified: 2012-05-12
I have an existing table in a database that has about 35 columns. I want to build another (empty) table with the EXACT same structure (no rows populated).

Is there a way to do this in phpmyadmin?

My thought is to export the structure only, edit the exported .sql file to change the name & import it.

Is there an easier way?
0
Comment
Question by:Richard Korts
  • 2
4 Comments
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 36474167
I would  click on Export tab, uncheck Data checkbox and click Execute button: that's all
0
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 36474181
Oh, yes: then you can copy and past the code, edit it as you need to change the table name, save it on your hard drive and then reimport it through Import tab of PhpMyAdmin. You can also past the edited code in SQL tab and click execute.
Cheers
0
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 total points
ID: 36474286
I think the action you want is something along the lines of CREATE TABLE LIKE myTable.
http://forums.mysql.com/read.php?97,23324,26293
http://dev.mysql.com/doc/refman/5.1/en/create-table.html
0
 

Author Closing Comment

by:Richard Korts
ID: 36474400
Perfect!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses
Course of the Month18 days, 5 hours left to enroll

830 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