當前位置:首頁 » 編程語言 » 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

熱點內容
魔獸清理緩存 發布:2025-07-03 10:46:38 瀏覽:518
神州防火牆web怎麼配置代碼 發布:2025-07-03 10:37:54 瀏覽:327
安卓看小說哪個軟體免費又最好 發布:2025-07-03 10:25:30 瀏覽:429
linuxprofile 發布:2025-07-03 10:25:29 瀏覽:718
存儲藍盤 發布:2025-07-03 09:55:10 瀏覽:887
java必學 發布:2025-07-03 09:21:57 瀏覽:446
go在線編譯 發布:2025-07-03 09:14:51 瀏覽:19
存儲控制器hp 發布:2025-07-03 08:59:51 瀏覽:504
密碼鎖延安多少一條 發布:2025-07-03 08:58:14 瀏覽:322
linux中gcc 發布:2025-07-03 08:51:04 瀏覽:412