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

熱點內容
華碩天選2air配置如何選擇 發布:2025-07-03 16:10:09 瀏覽:571
asp搜索源碼 發布:2025-07-03 15:49:55 瀏覽:235
醫美大資料庫 發布:2025-07-03 15:47:07 瀏覽:356
c語言將二進制轉化為十進制 發布:2025-07-03 15:32:47 瀏覽:988
c語言幫助文檔 發布:2025-07-03 15:22:43 瀏覽:320
雙埠存儲器在情況下會發生讀寫沖突 發布:2025-07-03 15:12:54 瀏覽:271
快站資料庫 發布:2025-07-03 14:45:44 瀏覽:40
jsp獲取上傳文件路徑 發布:2025-07-03 14:44:46 瀏覽:569
php時間微妙 發布:2025-07-03 14:39:38 瀏覽:844
巨豆豆手機回復出廠密碼是什麼 發布:2025-07-03 14:35:19 瀏覽:474