|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
consolidating tables
hopefully someone here can help me out....I need to transfer all of my records from multiple tables into one table, is there an easy way to do this with out transferring every single record one by one?? I was thinking about dumping the tables and then using update or something to put the dumped records in the new table(I dont exactly know how to actually do that though), all the tables have the same format and number of columns...please help
|
|
#2
|
||||
|
||||
|
I usually use a programming language.
I'll develop a script which simply grabs all the data I want from the table and prints out INSERT statements that I can use to make the new table. Its the easiest solution i've used =) not sure if there's any more efficient ones though. |
|
#3
|
|||
|
|||
|
Look over MySQL's INSERT...SELECT functionality; it's used for building queries that fill one table with the contents of others.
|
|
#4
|
||||
|
||||
|
wow! good catch Madpawn...
The documentation seems a little weak, but the ideas are there... nice! |
|
#5
|
|||
|
|||
|
the INSERT SELECT did the trick with minimal problems
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > consolidating tables |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|