In Mysql, if you wanna test a row exists or not, you could also try EXISTS:
SELECT EXISTS(SELECT * FROM table1 WHERE ...)
and per the documentation, you can SELECT anything.
Traditionally, an
EXISTSsubquery starts withSELECT *, but it could begin withSELECT 5orSELECT column1or anything at all. Mysql ignores theSELECTlist in such a subquery, so it makes no difference.
FYI: