X
X
xaam2018-08-08 20:20:33
SQL
xaam, 2018-08-08 20:20:33

Why doesn't this mariadb subquery work?

people tell me on mariadb.
Doing a delete with a nested subquery
DELETE FROM b_catalog_product
WHERE ID IN (SELECT PRODUCT_ID FROM b_catalog_price WHERE PRICE >=0 and PRICE <= 1)
produces
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line
2

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Shitskov, 2018-08-08
@Zarom

There don't seem to be any problems. Runs successfully.
And the checkers say - ok https://www.eversql.com/sql-syntax-check-validator/

A
Ambrosian, 2018-08-08
@Ambrosian

MySQL and its cousin MariaDB have always been pretty bad at dealing with subqueries.
It might have been fixed in the latest versions.
But if you have an old version of MariaDB, then why not have this jamb.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question