正在加载图片...
《数据厍设计与开发》讲义 1.4.2.10 RACle中对象类型 一般通过REF访问比通过连接访问的效率高 超过200元的订单号和顾客名 select x. ordnox oc cname from o x where x dollars> 200 获得引用(REF)对象值的函数REFO 没有通过代理商a05订货的顾客名 select x cname from c x where not exists(select from oy where y oc=ref(x)and y aid=a05) 通过北京的所有代理商订货的顾客cid select x cid from cx where not exists+不存在北京代理 (slct* from a y where y city=北京’ and not exists (select*from o z where 没有和该 z oc=ref(x)and z oa=ref(y)) 顾客订货 家邮电大学物你学院 部明80080北京邮电大学软件学院 郭文明 2003.06 《数据库设计与开发》讲义 1.4.2.1 ORACLE中对象类型 • 一般通过REF访问比通过连接访问的效率高. 超过200元的订单号和顾客名: select x.ordno,x.oc.cname from o x where x.dollars>200; • 获得引用(REF)对象值的函数REF(). 没有通过代理商a05 订货的顾客名: select x.cname from c x where not exists (select * from o y where y.oc=ref(x) and y.aid=‘a05’); 通过北京的所有代理商订货的顾客cid: select x.cid from c x where not exists (select * from a y where y.city=‘北京’ and not exists (select * from o z where z.oc=ref(x) and z.oa=ref(y))); 不存在 北京代理 没有和该 顾客订货
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有