jak nastavit NULL polozce
Jan Serak
sherry na pikebo.cz
Úterý Duben 25 13:59:03 CEST 2000
Milan Sorm wrote:
>
> jak mam nastavit, ze polozka muze byt NULL (v Oracle 8i) ?
>
> SQL> alter table fis.n_mohou_cist_nastenku_studenti modify (skupina null);
> alter table fis.n_mohou_cist_nastenku_studenti modify (skupina null)
> *
> CHYBA na řádku 1:
> ORA-01451: sloupec, který má být modifikován na NULL, nelze na NULL modifikovat
>
> to je prece nesmysl. proc by to nemelo jit na NULL modifikovat. tabulka je
> prazdna a zadny CHECK tam nemam.
SQL> !oerr ORA 1451
01451, 00000, "column to be modified to NULL cannot be modified to NULL"
// *Cause: the column may already allow NULL values, the NOT NULL constraint
// is part of a primary key or check constraint.
// *Action: if a primary key or check constraint is enforcing the NOT NULL
// constraint, then drop that constraint.
Jinak jedna trefna zkusenost ze 7.3.4: Pokud je skupina jiz NULL (tj. neni NOT
NULL)
a dela se alter na NULL (tj. de facto nema k zadne zmene dojit, tak 7.3.4-ka
vrati
presne tuhle chybu.
Jan Serak
Další informace o konferenci Test