HELP: HOW TO - Duplicate ROW content to new ROW

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
camarosource
Forum Commoner
Posts: 77
Joined: Sat Aug 03, 2002 10:43 pm

HELP: HOW TO - Duplicate ROW content to new ROW

Post by camarosource »

I am wondering if there is a way to DUPLICATE (MOST) of the contents in a mysql (phpmyadmin) ROW into a new row? Obviously not duplicate the primary since that needs to be unique.

I just need to know if there is a SQL to duplicate the fields and contents from one row to a new row. I can easily specifiy the FIELD's if needed (be better if I can specify like a " * " but a phrase to exclude some fields. BUT I CANNOT specify the CONTENTS of the fields. That would defeat the purpose. Basically a SQL Query in simple terms:

SELECT * from [TABLE] EXCEPT [FIELDS, FIELDS, FIELDS, FIELDS] where [MID (primary field) = "### into a NEWLY CREATED ROW with the contents into this new ROW.

Thanks,

Paul
Post Reply