SQL語句面試題,這幾個SQL語句面試題該怎麼寫

時間 2022-07-23 05:17:33

1樓:穎兒很乖

我也不知道 哈哈哈,因為這是我沒上過

sql語句 面試題

2樓:匿名使用者

(1)sql server資料庫: select top 5 * from 表名 where 課程名稱="數學" not in ( select top 5*2 * from 表名 where 課程名稱="數學" order by 分數 desc); 5*2的意思:5乘(要查詢的頁數-1)oracle 資料庫:

select * from (select rownum r, * from 表名 where 課程名稱="數學" and r between (pageindex-1)*5 and pageindex*5 order by 分數 desc); pageindex的意思:要查詢的頁數,這裡pagindex是3 (2)select 姓名 from 表名 where 學號="..." and 分數》80 ;(條件有學號,因為乙個學生他有幾門課的成績)

3樓:匿名使用者

select * from table where 課程='數學' order by 分數 desc limit 10,5;

select * from (select xuehao, sum(case when fenshu>80 then 1 else 0 end) as shumu from table group by xuehao ) a where shumu>課程數

sql語句的面試題求解答啊,一共三個表,懸賞100啊

4樓:蕭竹一笑

2,update employee set e_level=e_level+1,e_hiredate=sysdate where dept_id in(select dept_id from deptar where dept_name='監察部')

5樓:匿名使用者

select e_name,e_id from comp a , depar b , employee c

where a.comp_id = b.comp_id

and b.dept_id = c.dept_id

and b.dept_name = '財務部'

where dept_id = (select dept_id from depar where dept_name = '監察部' )

資料庫sql查詢語句面試題 5

sql面試題,SQL語句面試題

1.update t set logdate 2003 1 1 from t where logdate 2001 2 11 2.select from e a where not exists select count 1 from e where name a.name 1 3.delect f...

sql的幾個面試題,這幾個SQL語句面試題該怎麼寫

1.select student.name,courses.cname,enrolls from student,courses,enrolls where student.sno courses.sno and sourses.cno enrolls.cno 這幾個sql語句面試題該怎麼寫 我也不...

面試題目 sql ,sql 面試題目

select t2.years,sum t1.salary from table t1,table t2where t1.years t2.yearsgroup by t2.years select a.years,sum b.salary from table name a,table name ...

ibm的面試題,ibm的面試題

如果是按數學計算是賺2元。但去企業面試做這個考題的話,企業會加一些管理層面的東西,比如機會成本等。第一次買雞花了8元,那企業認為第二次買雞就不該去多花2元用10元購買。如果兩次都是按8元購買,那最後收益應該是4元。但他第二次多用2元用10元購買的,兩次的購買賺到2元。所以答案是 2 少賺2元。我是這...

求程式設計師面試題,求 JAVA程式設計師面試題

去csdn裡找吧。好多好多 程式設計師面試,可以看看 程式設計之美 微軟技術面試心得 裡面有很多大型it公司常考的題目 求 j a程式設計師面試題 huawei一般面試應屆c 資料結構,資料庫必考,自己複習吧 一般來說面試題目都會問你很基礎的東西 向struts這些開源框架一般不會問 你可以找個這人...