Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to set a null value to a field in a table using oracle sql developer tool?

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 ?

like image 553
Cshah Avatar asked Sep 11 '09 07:09

Cshah


People also ask

How do you set a value to NULL in SQL Developer?

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.

How do you set a field to NULL in SQL?

If you've opened a table and you want to clear an existing value to NULL, click on the value, and press Ctrl + 0 .

How do I create a column NULL in Oracle?

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.

How do you NULL in Oracle?

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.


1 Answers

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.

like image 171
charlie Avatar answered Oct 05 '22 17:10

charlie