-
Simple SQL Question
i'm sorry if this doesn't belong here but i figure this would be the best place since most servers use SQL in one way or another, so here goes....:
when i am using the LIKE operator and the * wildcat will it find matches where there is nothing for the letter?
for example:
LIKE "cat*" = "cat"?
or in otherwords is a null character a valid match for a wildcard?
-
what your search is asking for is that the first three letters be the same in any value it finds.
For example ('field LIKE "cat*"') if you had the following values in your database:
- cat
- category
- caterer
- current
- camera
- element
- concatinate
Your Query would return the following as each of those has their first three letters as "cat" which is all SQL is looking for since you added the wildcard to the end stating anything can follow those three letters:
- cat
- category
- caterer
If you had 'field LIKE "*cat*"' it would return 4 results:
- cat
- category
- caterer
- concatinate
-Matt
-
In Access, * or ? used as wildcards
Most if not all other SQL servers will use % or _