On Tue, Mar 10, 2020 at 12:49:01PM +0000, sivapostgres(at)yahoo(dot)com wrote:
> Hello,
> What returns when I run a query like this;
> Select * from test where name like 'co_%';
> I expect anything that starts with 'co_' and NOT 'co' only. Am I right? But I get every names that starts with 'co'. Why ?
> Happiness Always
> BKR Sivaprakash
Hi,
Check out the documentation:
https://www.postgresql.org/docs/12/functions-matching.html#FUNCTIONS-LIKE
You have 2 meta characters there. The '_' matches any character also.
Regards,
Ken