开发者

Can we use OR with LIKE predicate in DB2 queries?

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]%'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜