Question

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 ?

Was it helpful?

Solution

What version are you using? I've got 1.5.4 right now and it works perfectly. Just click the value and hit delete, then commit.

OTHER TIPS

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.

Do you mean editing in the data tab? Just insert an 'empty' string, which in oracle is equal to null.

Set "Display null value as" to (null) in tools -> preferences -> Database -> advanced settings

create table ff (v VARCHAR2(1));

INSERT INTO FF VALUES ('1');

Select table and select data tab.

This shows

V
=
1

Now double click the value 1 and delete the 1. Commit generates this statement in log:

UPDATE "OSIVOLG"."FF" SET V =  WHERE ROWID = 'AAA+zcAAFAAF9rgAAA' AND ORA_ROWSCN = '77536476584'

Which is syntacticly not a valid SQL statement but data tab now shows.

V
======
(null)

Some tools use <ctrl+0> to enter a NULL value.

there is a setting in tools -> preferences -> Database -> advanced settings that allows you to reset the default display of NULL columns. If you set it to blank that will probably solve your issue.

Select the relevant columns with the mouse (pressing CTRL to keep the selection as you go), then pressing SHIFT + DEL. This worked for me

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top