I have a query to select names of employee start with 'y', then my query would be
SELECT EMP_NM FROM EMP
WHERE EMP_NM LIKE'Y%'
Say for example
I need to retrieve names of employee names start with both 'y' and 'z', do we 开发者_如何学运维have anything to suffice my requirement? It's something like using OR with LIKE, correct?
Your time and responses are highly appreciated.
WHERE EMP_NM LIKE 'Y%' OR EMP_NM LIKE 'Z%'
or, not sure if DB2 supports this (not even sure I have right link to documentation...)
WHERE EMP_NM LIKE '[YZ]%'
精彩评论