|
|||||||
| SQL For all Structured Query Language, and general database questions. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
MySql copying a whole row into the same table
is there a quick and easy way to copy a whole row in a table and copy it the same table? obviously i want the ID to change to the next auto_increment value.
|
|
#2
|
||||
|
||||
|
INSERT INTO the_table(column_list) SELECT column_list FROM the_table;
obviously you're going to want to skip the ID when doing the column list.
__________________
Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter celery is tasteless - currently needing some UI time |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|