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
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
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
;
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