|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here! |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Ok let me begin by saying I am a complete newbie when it comes to databases. They scare me :| Well not really but they just confuse me more than anything. I need to duplicate an existing table in PHPmyAdmin into another new table.
Now this new table will be exactly the same except for the fact that one field (the product ID) will be different but all else would be the same. Would it be easier to copy the existing table and enter the changes manually, or create a new table from scratch and upload new data into the table. Again I apoligize for my ignorance, I am a web designer just starting to get into databases :) Thanks! |
|
|||
|
Hi,
It would be best and easiest to just make a copy of the table. Export the table using phpMyAdmin, then copy the output into text file. Then in order to make it unique, you just have to change the table name. The first line might be something like Code:
CREATE TABLE `table_name` ( Code:
CREATE TABLE `new_table` ( example, from Code:
INSERT INTO `table_name` Code:
INSERT INTO `new_table` |
|
|||
|
Thanks cyanide. Write before your post I figured out another way to do it.
If you select the database you want to copy, then click the "Operations" tab there is a choice to copy the existing database into a new one with either the same structure, same data, or both! And best of all I don't have to code anything! Yeaaaaaaaaah |
|
|||
|
Nice, glad you figured out a way to get it done -
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |