当前位置:首页 » 编程语言 » oracle的sql练习题

oracle的sql练习题

发布时间: 2024-11-23 10:28:37

A. oracle练习。用SQL语句建表

(1)
create table customer(
"客户编号" number(8),
"客户名称" varchar2(40),
"客户电话" varchar2(20)
);
(2)
insert into customer values(1,'客户1','13900000001');
insert into customer values(2,'客户2','13900000002');
insert into customer values(3,'客户3','13900000003');
insert into customer values(4,'客户4','13900000004');
insert into customer values(5,'客户5','13900000005');
insert into customer values(6,'客户6','13900000006');
insert into customer values(7,'客户7','13900000007');
insert into customer values(8,'客户8','13900000008');
insert into customer values(9,'客户9','13900000009');
insert into customer values(10,'客户10','13900000010');
(3)
select * from customer where rownum>=4 and rownum<=6;

B. Oracle嵌套表问题 PL/SQL

1.create table(PName varchar(20))
select distinct PName from Patient;

2.create table
select * from Patient

然后对Patient增加两个trigger
1.if(:New.DName not in Patient) insert 嵌套表1
2.on update insert ,insert 嵌套表2

热点内容
linux加载存储 发布:2024-11-23 13:02:44 浏览:804
ip电话时间服务器 发布:2024-11-23 12:56:06 浏览:298
C语言编译提醒不是一个函数 发布:2024-11-23 12:53:38 浏览:958
查看加密空间说说 发布:2024-11-23 12:37:47 浏览:2
安卓手机在哪里退款 发布:2024-11-23 12:36:53 浏览:965
ftp多少w 发布:2024-11-23 12:33:21 浏览:310
linuxsvn重启服务 发布:2024-11-23 12:31:24 浏览:558
西软服务器地址 发布:2024-11-23 12:27:20 浏览:8
二进制java 发布:2024-11-23 12:25:01 浏览:499
和包在京东支付密码是什么 发布:2024-11-23 12:24:52 浏览:49