I want to duplicate a row in a table.
I thought that
might do it, but it doesn't. Help, please, experts ...UPDATE table1 SET id '1' = id '2';
| SitePoint Sponsor |

I want to duplicate a row in a table.
I thought that
might do it, but it doesn't. Help, please, experts ...UPDATE table1 SET id '1' = id '2';




I don't understand what you are trying to accomplish. Give some sample data that describes the contents before and after the operation.


does your table have id as the primary key?Code:INSERT INTO table1 ( id , somecol ) SELECT 5 , somecol FROM table1 WHERE id = 4

Thanks, r937, you helped enormously elsewhere. I would have been back sooner, only there weren't any email notices.
Bookmarks