tags:

views:

46

answers:

1

This question is about the gui application (DB2 Control Center), not about sql statements

At my work, we develop an application that supports sql server, oracle and db2. Therefore we use the gui applications of all three of them at varying capacity.

The problem is when I edit a record and I want to insert a null value. For sql server (sql management studio), ctrl+0 does the trick. For oracle (sqldeveloper) it doesn't matter because empty strings are essentially nulls.

Does anyone know how I can do that with the Control Center for db2? currently I resort to executing statements via the command editor as a workaround, but it is such a waste of time.

A: 

If you leave the field blank, it'll insert a NULL.

In more depth, if I double-click the table name, I get a window containing the first 100 records in that table. Then, I click the 'Add Row' button, and a new empty row shows up at the bottom of the listing. I fill in the mandatory fields, leaving the nullable fields blank, then click the 'Commit' button to commit that insert. Fields that are left blank are inserted as nulls.

CanSpice
Thanks a lot, I'll give it a try. Although, this is only a partial solution, I want to be able to "nullify" columns of existing rows too.
Yoni
I think if you just highlight the field, hit 'backspace' (or 'delete'), then commit the change, it'll turn it into a null value.
CanSpice