oracle中创建表的sql语句如何添加default约束
发布网友
发布时间:2022-04-11 10:55
我来回答
共3个回答
热心网友
时间:2022-04-11 12:24
create table bookType(
bookTypeId number primary key,
parentId number not null,
bookTypeName varchar2(20) not null,
isDelete number not null default 1,
context varchar2(40)
)
热心网友
时间:2022-04-11 13:42
alter table booktype modify isdelete default 1;
--感觉你们都是用sqlserver语法在解决
热心网友
时间:2022-04-11 15:17
create table bookType(
bookTypeId number primary key,
parentId number not null,
bookTypeName varchar2(20) not null,
isDelete number not null default 1 , --1为可用,0为不可用
context varchar2(40)
)
alter table bookType
alter isDelete set default 1