On 9/7/2005 1:17 PM Ryan Stille intelligently wrote:
I am migrating from MS SQL Server to MySQL 4.1.
I have code in my ColdFusion/SQL Server application that went something
like this:
cfquery name=insertquery
SET NOCOUNT ON
INSERT INTO TABLE ()
SELECT @@IDENTITY AS adid
SET NOCOUNT
it might be best to ask this in the cf forums, however did
you try to separate the statements with a ; ? I haven't tried
2 query statements for MySQL in cfquery...yet ;-) Also I
believe MySQL 3.23+ supports @@identity
Yes I've tried semicolons after the statements, and I've tried setting
http://dev.mysql.com/doc/mysql/en/insert-select.html
There are 2 forms of INSERT INTO statement
1. INSERT INTO tbl_name (...) VALUES(...);
2. INSERT INTO tbl_name (...) SELECT ...;
there's no : INSERT INTO tbl_name (...) VALUES(...) SELECT ...;
its either ... or in MySQL i.e. aither provide