insert into mytable(field1, field2, field3) select field1, field2, newvalue from mytable where productcode=xx
> -----Original Message----- > From: Doug Coning [mailto:lists@;coning.com] > Sent: Friday, 8 November 2002 14:35 > To: [EMAIL PROTECTED] > Subject: Copy Records in a table... > > > Hi everyone, > > I'm still learning MySQL. I have a database of 600 items. I am still > adding products. Several of these products are identical in nature, but > have maybe one or two columns that are different. Is there a way > to write a > SQL command that selects these items and then inserts them, and > then updates > them respectively with one command? > > Thanks, > > Doug > > > > > > MySQL > > > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php