Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
コラムがありますColumn1 integer check(column1 >=0) not null unique;。column1 のチェック値が <=0 になるように列を変更したいと思います。私はすでに試しました:alter table table1 alter column column1 type integer check(column1 <=0) not null unique;しかし、うまくいきません。解決策はありますか?
Column1 integer check(column1 >=0) not null unique;
alter table table1 alter column column1 type integer check(column1 <=0) not null unique;
したがって、データベースとは何かと言ったように、これは必要なコマンドです。
alter table table1 add constraint CK_NEGATIVEVALUES check ( column1 <=0 )
チェックを追加するために列を変更しない テーブルを変更してチェックを追加するCONSTRAINT CHECK
CONSTRAINT CHECK