Solved

phpmyadmin

Posted on 2011-09-02
4
332 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
[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 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 110

Accepted Solution

by:
Ray Paseur earned 500 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

690 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