Many languages have a construction that fills a syntactic position of a statement but has no effect: pass in Python, \relax in TeX, CONTINUE in Fortran, ; in C and Perl.
What is its equivalent in MySQL? That is, a query that would be syntactically correct but have no effect -- apart from confusing expressions like SELECT * FROM table LIMIT 0.
This is useful when the queries are generated automatically and at some point the generation procedure is expected to generate a query but there is no action to do.
This query:
SELECT 1 FROM DUAL WHERE false
or simpler in MySql 8.0+:
SELECT 1 WHERE false
return nothing, if this is what you mean when you say no effect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With