What the difference in the following to query ?
FROM COMPANY WHERE ADDRESS GLOB '*-*';
FROM COMPANY WHERE ADDRESS LIKE '%-%';
I know unlike LIKE operator, GLOB is case sensitive. Is it the only difference ?
What the difference in the following to query ?
FROM COMPANY WHERE ADDRESS GLOB '*-*';
FROM COMPANY WHERE ADDRESS LIKE '%-%';
I know unlike LIKE operator, GLOB is case sensitive. Is it the only difference ?
The documentation says:
The GLOB operator is similar to LIKE but uses the Unix file globbing syntax for its wildcards. Also, GLOB is case sensitive, unlike LIKE.
And that's it.
Other difference that GLOB you can use it as regular expression i.e. : to select fields which end with number use GLOB '*[0-9]'
to select fields which doesn't contain any number use GLOB '[^0-9]