102年 資料庫應用 高考三級 - 高考

By Mary
at 2013-07-11T12:54
at 2013-07-11T12:54
Table of Contents
※ 引述《GLTY (小呆呆~)》之銘言:
: 讓小弟獻醜一下吧...
: (二)
: SELECT 姓名,年齡
: FORM 工程師 E,產品 P,設計 D
: WHERE (年銷售量<=10000 AND P.代號=D.代號 AND D.編號=E.編號) OR
: E.編號 NOT EXISTS (SELECT 編號
: FROM 設計)
: SQL語法還不是很熟練
: 若有錯還請大大指教一下
: 附上考卷網址http://ppt.cc/PuiU
要這樣吧
SELECT 姓名,年齡
FROM 工程師 E
where E.編號 IN
( SELECT E1.編號
FROM 工程師 E1
where not exists( select *
from 設計 D
where E1.編號=D.編號
)
)
OR E.編號 IN
(select D1.編號
from 設計 D1 , 產品 P
where D1.代號=P.代號AND 年銷售量<10000
)
)
--
: 讓小弟獻醜一下吧...
: (二)
: SELECT 姓名,年齡
: FORM 工程師 E,產品 P,設計 D
: WHERE (年銷售量<=10000 AND P.代號=D.代號 AND D.編號=E.編號) OR
: E.編號 NOT EXISTS (SELECT 編號
: FROM 設計)
: SQL語法還不是很熟練
: 若有錯還請大大指教一下
: 附上考卷網址http://ppt.cc/PuiU
要這樣吧
SELECT 姓名,年齡
FROM 工程師 E
where E.編號 IN
( SELECT E1.編號
FROM 工程師 E1
where not exists( select *
from 設計 D
where E1.編號=D.編號
)
)
OR E.編號 IN
(select D1.編號
from 設計 D1 , 產品 P
where D1.代號=P.代號AND 年銷售量<10000
)
)
--
Tags:
高考
All Comments

By Quanna
at 2013-07-12T21:02
at 2013-07-12T21:02

By George
at 2013-07-15T02:24
at 2013-07-15T02:24

By Tom
at 2013-07-18T23:25
at 2013-07-18T23:25

By Steve
at 2013-07-20T02:43
at 2013-07-20T02:43

By Candice
at 2013-07-22T14:52
at 2013-07-22T14:52

By Caitlin
at 2013-07-26T06:19
at 2013-07-26T06:19

By Robert
at 2013-07-29T08:45
at 2013-07-29T08:45

By Joseph
at 2013-07-29T23:14
at 2013-07-29T23:14

By Yuri
at 2013-08-02T13:58
at 2013-08-02T13:58

By Adele
at 2013-08-07T00:18
at 2013-08-07T00:18

By Necoo
at 2013-08-10T21:37
at 2013-08-10T21:37

By Agnes
at 2013-08-12T11:40
at 2013-08-12T11:40
Related Posts
102年 資料庫應用 高考三級

By Olivia
at 2013-07-11T12:30
at 2013-07-11T12:30
102年 資料庫應用 高考三級

By Margaret
at 2013-07-11T12:11
at 2013-07-11T12:11
102年 資料庫應用 高考三級

By Lucy
at 2013-07-11T11:28
at 2013-07-11T11:28
高考真的高手如雲阿...

By Jacob
at 2013-07-11T11:01
at 2013-07-11T11:01
102高考會計 中會&成管

By Anonymous
at 2013-07-11T08:50
at 2013-07-11T08:50