Skip to content
Advertisement

how does ‘ ‘ i.e single quote space single quote work in sql?

I observed that this query returns all values from the database.

Why is that?

Advertisement

Answer

This query:

Would not be valid in most databases. Some interfaces concatenate adjacent strings, so this is interpreted as:

The two wildcards are the same as one. This will match every non-NULL value.

If you want to find emails with a space, then correct logic is:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement