Hello everybody,
we have quite big database and I've been going through some old tables and found something really strange.
Many tables are written as:
CREATE TABLE log (
id NUMBER(16) NOT NULL
CONSTRAINT pk_log PRIMARY KEY
.....
Since PK itself contains NOT NULL condition, I think that the NN constraint really isn't necessary.
We didn't have versioning control at the time so I cannot find out who - and what I really want to know is why - did this and those people are probably not in the company anymore.
I need an advice on:
1. Is there any advantage on writting a CREATE TABLE statement this way?
I think it's rubbish and I searched the documentation and didn't find a thing.
Am I missing something?
I queried user_cons_columns and two constraints are created.
Writting a block of code that would drop all NN constraints from columns where PK exists is not a problem, but I would have to open every script and modify create table stmt, which would be quite consuming. So I really need to know
2. Is there any negative impact on performance???
If yes, then please clarify a bit why?
Thanks in advance for all replies.