dbTalk Databases Forums  

Inserting (almost) duplicate rows! Part II

comp.databases.mysql comp.databases.mysql


Discuss Inserting (almost) duplicate rows! Part II in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
strawberry
 
Posts: n/a

Default Inserting (almost) duplicate rows! Part II - 09-27-2006 , 04:29 PM






This is a follow-up to my previous thread (as Google Groups deosn't
seem to be working properly)

Sorry Jerry, I probably didn't explain myself terribly well. I just
wanted to know what the simplest MySQL statement for achieving this
would look like. Anyway, I think I've answered my own question
(although I don't think it's particularly elegant - room for
improvement on this one over at MySQL HQ!):

INSERT INTO contacts (a list of all fields minus the primary key field)

SELECT a list of all fields minus the primary key field
FROM contacts WHERE contact_id = id of row to be duplicated;

Regards,


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.