Multiple queries on same line on a MySQL node doesn't work

Hello,
I am trying to do two different queries on a same query using MySQL node. This is something possible on MySQL using a semiclon (:wink: between each query. It looks just like this:

UPDATE comments SET action = "liked" WHERE comment_id = '123';UPDATE users SET likes = likes + 1 WHERE userid = '777';

If i execute this on phpMyAdmin, my MySQL administration tool, it works perfectly. As you can see:

But if I do the exact same query on a MySQL node on n8n, I get an error.

How can I solve this? Thank you! :slight_smile:

Hey @ruccc!

I can confirm that you can not run multiple queries currently in the node. You will have to use a separate MySQL node to do this.

Do you think it should be allowed to execute multiple queries in a single node? If yes, can you please create a feature request :slight_smile:

Also, instead of using the Execute Query operation, you can use the Update operation to update the values.

1 Like

Thanks! Good to know.

No problem using separate nodes. I was just wondering if maybe using multiple nodes makes the execution of the workflow longer than if it was all the queries in only one node. Sometimes quickness (even miliseconds) is important!

If it is so, I would gladly create a feature request! :slight_smile: