Re: select * from test where name like 'co_%'

Поиск
Список
Период
Сортировка
От Kenneth Marshall
Тема Re: select * from test where name like 'co_%'
Дата
Msg-id 20200310125428.GV32117@aart.rice.edu
обсуждение исходный текст
Ответ на Re: select * from test where name like 'co_%'  ("sivapostgres@yahoo.com" <sivapostgres@yahoo.com>)
Список pgsql-general
On Tue, Mar 10, 2020 at 12:49:01PM +0000, sivapostgres@yahoo.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



В списке pgsql-general по дате отправления:

Предыдущее
От: "sivapostgres@yahoo.com"
Дата:
Сообщение: Re: select * from test where name like 'co_%'
Следующее
От: Paul Foerster
Дата:
Сообщение: Re: select * from test where name like 'co_%'