create table productinfo
(ProductID varchar2(10),ProductName varchar2(20),ProductPrice number(8,2)
,Quantity number(10),Category varchar2(10),Desperation varchar2(1000),Origin varchar2(10));
alter table productinfo add remark varchar2(200);
alter table productinfo modify remark number(2,2);
alter table productinfo drop column remark;
create table categoryinfo(
CategoryId varchar2(10),
CategoryName varchar2(30),
primary key(CategoryId));
alter table categoryinfo
add constraints pk_category primary key(CategoryId);
alter table categoryinfo drop constraints CategoryId;
create table productinfo1
( productid varchar2(20),
productname varchar2(20),
productprice number(8,2),
quantity number(10),
desperation varchar2(1000),
category varchar2(10),
origin varchar2(10),
primary key (productid),
constraints fk_pro foreign key(category)
references categoryinfo(CategoryId)
on delete cascade);
alter table productinfo1 drop constraints fk_pro;
create table custominfo
( CumstomId varchar2(10),
Name varchar2(10),
Age number(2),
Gender varchar2(2),
Tel varchar2(10),
Address varchar2(100),
constraint chk_age check(age>=18 and age<=50));
)
alter table custominfo drop constraint chk_age;
alter table custominfo add constraint chk_age check(age>=18 and age<50);
alter table custominfo add constraint my_unique unique(Name);
alter table custominfo add constraint my_unique2 unique(Age);
alter table custominfo drop constraint my_unique;
alter table custominfo modify Name not null;
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)