| От | Tino Wildenhain |
|---|---|
| Тема | Re: postgresql vs mysql |
| Дата | |
| Msg-id | 45DF4B6D.2010807@wildenhain.de обсуждение исходный текст |
| Ответ на | Re: postgresql vs mysql (Glen Parker <glenebob@nwlink.com>) |
| Список | pgsql-general |
Glen Parker schrieb: > Ben wrote: >> I'm sorry maybe I missed something, but if you don't need NULLs and >> feel they just add extra work, why don't you just declare all your >> columns to be not null and have them default to zero or an empty string? > > Because I DO need NULLS for non text fields, and I still want NULL to > compare equal to, say, '' and 0. I don't think you read what I wrote... > > Put another way, I would like to redefine NULL to mean BLANK or NOT > ENTERED. Totally different concept. Not wise concept, but here you go: WHERE coalesce(sometimesnull,'') = '' or WHERE coalesce(sometimesnull,0 ) = 0 ... Regards Tino
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера