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
Re: LIKE '%%' does not return NULL
Список 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 по дате отправления: