Link to home
Create AccountLog in
Avatar of Jay Roy
Jay RoyFlag for United States of America

asked on

update column value if column value is not empty or null

hi guys

I am trying to write an update statement

UPDATE table1
check if table1.id is not null or empty
only if table1.id  is not empty  or null
           SET table1.id = my_id
         WHERE table1.id = passed_id;

any idea how i can write it
ASKER CERTIFIED SOLUTION
Avatar of Member_2_2484401
Member_2_2484401
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.