Search Postgresql Archives

Re: How to set a value when NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
Need to set a value of Zero when the field value is NULL in trigger function.

Tried with,
NEW.fieldname = NULLIF(NEW.fieldname, 0)

in before insert/update trigger.

Looks like it's not working.  I'm doing anything wrong.

Happiness Always
BKR Sivaprakash


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux