The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
....I need to duplicate a table in the database, basically make a copy and rename it. The data in the fields doesn't matter, just the format of the table and fields.
Any help on how to achieve this? G ![]() |
#2
|
|||
|
|||
![]() Quote:
MySQL will allow you to rename the table which copies the table to a temp table, then creates a new table with the new name and copies the data from the temp table into the new one and finally removes the old table. If this isn't what you need then please indicate which process you need to do. |
#3
|
||||
|
||||
![]()
Thanks for the reply.
I still need the original table I'm copying, just need a duplicate under a different name. Hope I've explained it clearly, not sure....? To be exact : I need a table called "rules" which would be a copy of the "faq" table, same fields, values etc. G ![]() |
#4
|
||||
|
||||
![]()
hmmm....
you could get the sql query for the table you want to duplicate and in that sql query you could just change the table name and poof you got a dublicated table with different name ![]() example(original table): [sql] CREATE TABLE blahblah..... [/sql] example sql query for duplicate of original: [sql] CREATE TABLE blahblah2.... [/sql] so basically just change the table name of the original table's sql query and you have a duplicated table ![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|