设为首页 加入收藏

TOP

oracle面试题及其答案(六)
2014-11-24 02:23:02 】 浏览:2420
Tags:oracle 试题 及其 答案
t values (3 )
insert into test values (4 )
insert into test values (5 )
insert into test values (6 )
insert into test values (8 )
insert into test values (9 )
insert into test values (11)
insert into test values (12)
insert into test values (13)
insert into test values (14)
insert into test values (18)
insert into test values (19)
go
Now I want to list the result of the non-contignous row as below,how can I do it
Missing after Missing before
————- ————–
6 8
9 11

Answer 10:
select id from test t where not exists(select 1 from test where id=t.id+1)
or not exists(select 1 from test where id=t.id-1)
29. Question11: How can I list all book with prices greather than the average price of books of the same type
In database pubs, have a table named titles , its column named price mean the price of the book, and another named type mean the type of books.
Now I want to get the result as below:
type title price
———— ——————————————————————————– ———————
business The Busy Executive’s Database Guide 19.9900




Answer 11:
select a.type,a.title,a.price from titles a,
(select type,price=avg(price) from titles group by type)b
where a.type=b.type and a.price>b.price
试题点评:通览整个试题,我们不难发现,这份试题是针对SQL Server数据库人员的。而从难度分析上来看,这份试题也属于同类试题中比较难的了。之所以说它难,首先是限定时间的全英文试题;其次,尽管这份试题主要是考核开发能力,但却涉及到了算法的选择和性能的调优;最后,这份试题还夹进了SQL Server数据库的升级问题。因此,综上所述,我们估计这是一家从事程序外包工作的外企招聘后台开发或与后台开发相关的SQL Server高级程序员的试题。


首页 上一页 3 4 5 6 7 8 9 下一页 尾页 6/9/9
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇如何判断一段程序是由 C 编译程序.. 下一篇用链表模拟大整数加法运算

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目