Skip to content

SQL if not null update

I have this query UPDATE users SET username = Param1,email = Param2,PASSWORD = Param3 WHERE id = Param4; this is updating my user row, but i want to say: If email OR password is not null update them …

Select row of data to be the output header

I have a very large set of data that is formed similar to this: I want to produce report output that drops the table headers (field1, field2, field3) and instead use data row1 as headers in output. I am able to do this nicely in SQLPlus and SPOOL to CSV, but I want to do everything in PLSQL so that