Re: How to set a value when NULL

2020-03-11 Thread David G. Johnston
On Wednesday, March 11, 2020, sivapostg...@yahoo.com wrote: > 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 anythi

Re: How to set a value when NULL

2020-03-11 Thread sivapostg...@yahoo.com
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 AlwaysBKR Sivaprakash