Solved

phpmyadmin

Posted on 2011-09-02
4
330 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 109

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
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.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

820 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