Re: INSERT ... SELECT not supported?

2002-03-19 Thread Jeff Kilbride
example of this in Paul DuBois' book MySQL from New Riders. --jeff - Original Message - From: Allon Bendavid [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 18, 2002 7:57 PM Subject: INSERT ... SELECT not supported? Hello All- I just read that an Insert ... Select naming

INSERT ... SELECT not supported?

2002-03-18 Thread Allon Bendavid
Hello All- I just read that an Insert ... Select naming the same table is not supported in MySQL. What is the alternative? What we need to do is simply insert the max of a column + 1 to create essentially a counter in a situation where an auto_increment counter would not work. Anyone? -Allon

Re: INSERT ... SELECT not supported?

2002-03-18 Thread Colin Faber
use an auto_increment column. Or if this is during an UPDATE UPDATE tbl SET col = col + 1 WHERE ..; Allon Bendavid wrote: Hello All- I just read that an Insert ... Select naming the same table is not supported in MySQL. What is the alternative? What we need to do is simply insert

RE: INSERT ... SELECT not supported?

2002-03-18 Thread Gurhan Ozen
; INSERT INTO TABLE VALUES (@a+1); Hope this helps.. Gurhan -Original Message- From: Allon Bendavid [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 10:58 PM To: [EMAIL PROTECTED] Subject: INSERT ... SELECT not supported? Hello All- I just read that an Insert ... Select naming