Search code examples
jpqlisnullis-empty

JPQL difference between "IS EMPTY" and "IS NULL"


What is the difference between IS EMPTY and IS NULL in JPQL?

Is it about empty strings or something else?


Solution

  • IS NULL is used for NULL comparison. IS EMPTY is used for collection comparison.

    What you probably want to know is the difference between NULL and empty string. Have a look at this answer.