LIKE '%%' does not return NULL

Поиск
Список
Период
Сортировка
От Traci Sumpter
Тема LIKE '%%' does not return NULL
Дата
Msg-id KFEJJKOAGCCGEJFLKCBBKEALEBAA.Traci.Sumpter@opus.co.nz
обсуждение исходный текст
Ответы Re: LIKE '%%' does not return NULL  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Re: LIKE '%%' does not return NULL  (Frank Finner <postgresql@finner.de>)
Список pgsql-sql
A team developer has chosen the lazy way of not checking if a variable
exists on his PHP page and has code which produces the following SQL

SELECT * FROM mytable where myfield ilike '%%'

I have noticed that this statement does not return null or empty myfield
records.

Is this the way (SQL) to do this??

Is there a better syntax to the SQL??

Is the better way to create the statement in PHP is to check if the passed
value <> '' ??

Or is this issue being fixed in the new V8 version of postgreSQL.



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

Предыдущее
От: Sascha Ziemann
Дата:
Сообщение: Re: UNIQUE constraint
Следующее
От: Michalis Kabrianis
Дата:
Сообщение: Re: Sum and count weird results