I use something like select name from employees where name like 'U%' It works great to get all employees with name starting from 'U'. However some names started from 'u' (lower case) and do not get listed. How it can be solved? using union doesn't look like smart. PostGreSQL documentation states that I can use regular expression, but they do not work. I do not know why oracle style is working. Any help?
It is database dependent whether a "like" is case sensitive. I don't know about regular expressions in PostGreSQL, but there are three database independent approaches.
1) Union - I realize you stated this doesn't work. I'm mentioning it anyway because it should work so maybe the syntax is different. select name from employees where name like 'U%' union select name from employees where name like 'u%'
2) Or select name from employees where name like 'U%' or name like 'u%'
3) Uppercase select name from employees where to_upper(name) like 'U%'