"if not exists" statement ??
883579Aug 20 2011 — edited Aug 20 2011Hello
I'm working with PLSQL and I have a problem. I need to check if a field in my database is empty or full. If it is empty, the sql statement should be executed, if it's not, the statement should NOT be executed. I was checking out the "if not exists" statement but I can't implement it. Do you know how I can do that.
The field's name is winnerid, so if there's a winnerid integer assigned, the field should no longer take new values via updates.
That's the SQL code I have so far
"here should be the statement cheking if there's value in the field 'winnerid' " then
update taskauction set winnerid=100004 where taskid=50625
Again, if there's an integer(regardless of its value in the field winnerid), the statment "update taskauction set winnerid=100004 where taskid=50625" should not be executed, if the value in the field is null, then it should execute
Thanks for the help