Expand my Community achievements bar.

Problem with SQL-Syntax in Workbench

Avatar

Level 1

can you help me to solve this problem:

insert into testhristo (
    firstName,
    surName,
    federateState,
    email
) values (?,?,?,?)

insert into kunde (
    testPersonID, statusOfHearing
) values (last_insert_id(), ?)

Exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insert into kunde (
    testPersonID, statusOfHearing
) values (last_insert_id(),' at line 8

3 Replies

Avatar

Level 2

You can only specify an insert statement at one time.

Avatar

Level 10

You can use Execute Sql Statment operation to run multiple SQL commands at a time.

Provided that you must separate each statement with a semi-colon.

I've tried this with Sql Server 2008. Are you using a different database?

Nith