Oracle SQL Developer allows you to update field values directly to the table without needing to write a sql script. However it doesnt allow you to set a null value for a field? the update script that gets generated is below : UPDATE "TABLE" SET field_required = 'null' WHERE ROWID = 'AAAnnZAAFAAAGMfAAC' AND ORA_ROWSCN = '14465324'
Any idea how to set a null value to a field in the table without writing an update statement ?
Click in the column value you want to set to (null) . Select the value and delete it. Hit the commit button (green check-mark button). It should now be null.
If you've opened a table and you want to clear an existing value to NULL, click on the value, and press Ctrl + 0 .
You can use the column NULLABLE in USER_TAB_COLUMNS. This tells you whether the column allows nulls using a binary Y/N flag. If you wanted to put this in a script you could do something like: declare l_null user_tab_columns.
Here is an example of how to use the Oracle IS NULL condition in a SELECT statement: SELECT * FROM suppliers WHERE supplier_name IS NULL; This Oracle IS NULL example will return all records from the suppliers table where the supplier_name contains a null value.
Using SQL Developer 3.0 here. What works for me is to first highlight the cell that I want to set to null. Hit backspace twice and move out of the cell (or do whatever you need to do to get out of edit mode). The first backspace puts the cell into edit mode and clears out the existing value. The second backspace is where the "null" value gets set (this is not visually apparent). Commit your changes and the null values will now show up in the refreshed data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With