17,377
社区成员
发帖
与我相关
我的任务
分享
-- 1、通过如下语句查出 年龄 列上的约束名称,以SYS_开头的
select * from user_constraints
where table_name = '学生' and constraint_type = 'C'
-- 2、先删除约束
alter table 学生 drop constraint SYS_CXXXXXXXX;
-- 3、这是你的操作,修改成这个样子的
ALTER TABLE 学生 MODIFY COLUMN 年龄 number(2) (CHECK>0);