Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-1400 - mandatory (NOT NULL) column is missing or NULL during insert
Maxim V. Krapivin <baltros_at_mail.wplus.net> wrote in article
<353dd648.0_at_nam>...
> Oleg Mineev wrote :
> >ORA-1400 - mandatory (NOT NULL) column is missing or NULL during insert
> >How I can get the failed constraint name ?
>
>
> Try to execute following query :
>
> SELECT constraint_name, search_condition
> FROM SYS.ALL_CONSTRAINTS
> WHERE table_name = UPPER('my_table_name')
>
> This query retrieves the names of all constraints for specified table,
> including constraints for NOT NULL columns.
>
> Maxim. maximka_kr_at_usa.net
Also,
oracle changes your simple (unnamed) 'not null' clauses in the create table
statements from
column1 varchar2(1) not null
to
column1 varchar2(1) constraint SYS_C123456 NOT NULL
The net-effect is that front-ends like forms will tell you that you hav
violated constraint
SYS_C123456 (veeeeery helpfull).
You should get in the habbit of creating your tables as: column1 varchar2(1) constraint NN_Column1 NOT NULL or whatever your naming standard.
--
reply address is altered to keep the spam down
remove the nospamplease part to reply...
Gert Rijs
gem at wirehub.nl
www.wirehub.nl/~gem
Received on Wed Apr 22 1998 - 14:27:12 CDT