神州数码面试题求解
1)Which statement shows the maximum salary paid in each job category of each department?_______
A. select dept_id, job_cat,max(salary) from employees where salary > max(salary);
B. select dept_id, job_cat,max(salary) from employees group by dept_id,job_cat;
C. select dept_id, job_cat,max(salary) from employees;
D. select dept_id, job_cat,max(salary) from employees group by dept_id;
E. select dept_id, job_cat,max(salary) from employees group by dept_id,job_cat,salary;2)description of the students table:
sid_id number
start_date date
end_date date
which two function are valid on the start_date column?_________。
A.sum(start_date)
B.avg(start_date)
C.count(start_date)
D.avg(start_date,end_date)
E.min(start_date)
F.maximum(start_date)3)for which two constraints does the oracle server implicitly create a unique index?______。
A. not null
B. primary
C. foreign key
D. check
E. unique4)in a select statement that includes a where clause,where is the group by clause placed in the select statement?______。
A. immediately after the select clause
B. before the where clause
C. before the from clause
D. after the order by clause
E. after the where clause5)in a select statement that includes a where clause,where is the order by clause placed in the select statement?______.
A.immediately after the select clause
B.before the where clause
C.after all clause
D.after the where clause
E.before the from clause6)uate there two sql statements______.
Select last_name,salary from employees order by salary;
Select last_name,salary from employees order by 2 asc;
A.the same result B.different result C.the second statement returns a syntax error7) you would like to display the system date in the format“20051110 14:44:17”。Which select statement should you use?______。
A. select to_date(sydate,’yearmmdd hh:mm:ss’)from dual;
B. select to_char(sydate,’yearmonthday hh:mi:ss’)from dual;
C. select to_date(sydate,’yyyymmdd hh24:mi:ss’)from dual;
D. select to_char(sydate,’yyyymmdd hh24:mi:ss’)from dual;
E. select to_char(sydate,’yy-mm-dd hh24:mi:ss’)from dual;8)which select statement will the result ‘ello world’from the string‘Hello world’?______.
A. select substr(‘Hello World’,1)from dual;
B. select substr(trim(‘Hello World’,1,1))from dual;
C. select lower(substr(‘Hello World’,1))from dual;
D. select lower(trim(‘H’from‘Hello World’))from dual;9)which are DML statements(choose all that apply)______.
A.commit B.merge C.update D.delete E.creat F.drop10)Select 语句中用来连接字符串的符号是______.
A. “+” B. “&” C.“||” D.“|”

解决方案 »

  1.   

    1,b
    2,c,e
    3,b,e
    4,b
    5,c
    6,a
    7,d
    8,d
    9,b,c,d  update delete insert merge 
    10 c考ORACLE?
      

  2.   

    10、A 9、C D E F 8、C 7、D 6、B 
      

  3.   

    对于sql server  10、A
      

  4.   

    第二题为什么是c,e啊。。D那个不对吗我们公司面试题
    我没有用过oracle都给人家评错了
      

  5.   

     E.creat F.drop
    是DDL语法。
      

  6.   

    求加小f的qq详细咨询一下。。
      

  7.   

    那第10题为什么不能选A了。
    select语句也没有说是oracle
      

  8.   

    哦第5题为什么选择c 啊。。这个在sql中应该是不行的啊
      

  9.   

    对PL/SQL只会一点点 献丑了。
      

  10.   

    ORDER BY 是应该放在所有查询的 最后吧 
      

  11.   

    不过我挺佩服你的小f。你的sql那么牛。以后还要好好给你学学。。
      

  12.   


    SQL版那么多大牛。你让哥情何以堪。
      

  13.   

    A,B,D,E答案应该是错的吧。
    难道在SELECT 前?WHERE 前后?
      

  14.   


    第4题应该选e才对,
    问题是问group by子句在select语句中放置的位置,
    group by应该放在select子句后面,
    如:select name from Product where productId > 5 group by productId
      

  15.   

    我们公司用的神州数码的Tiptop ERP,里面几乎都是SQL
    也难怪面试的是SQL
      

  16.   

    第7题是错的。
    7) you would like to display the system date in the format“20051110 14:44:17”。Which select statement should you use?______。
    A. select to_date(sydate,’yearmmdd hh:mm:ss’)from dual;
    B. select to_char(sydate,’yearmonthday hh:mi:ss’)from dual;
    C. select to_date(sydate,’yyyymmdd hh24:mi:ss’)from dual;
    D. select to_char(sydate,’yyyymmdd hh24:mi:ss’)from dual;
    E. select to_char(sydate,’yy-mm-dd hh24:mi:ss’)from dual;sysdate是关键字,取系统时间
      

  17.   

    1.B  
    2.C,?  
    3.B,E  
    4.E
    5.C
    6.A
    7.D
    8.C
    9.C,D
    10.C
      

  18.   

    第八题比较阴险:substr('Hello world',1)其实和substr('Hello world',0)效果一样,起不到截断效果,故应该选D。
    第三题我试了一下,应该选C,E
    第九题,DML确实包括merge,应该选B,C,D
    故正确答案为:
    1.B   
    2.C,E  
    3.B,E   
    4.E
    5.C
    6.A
    7.D
    8.D
    9.B,C,D
    10.C 
      

  19.   

    1.查询出每个部门,不同职位的最高薪水,分组字段为dept_id,job_cat.这道题正确答案为 B2.SUM,AVG函数只能用于数值类型,所以A,B不正确,D也是错误的,因为AVG只有一个参数.至于F选项,获取最大值函数是MAX而不是maximum.正确答案: C,E3.ORACLE会为PRIMARY和UNIQUE创建隐含索引.正确答案: B,E
    WHERE,GROUP BY,ORDER BY同时出现在SQL语句中的顺序为: WHERE,GROUP BY,ORDER BY
    4.正确答案: E5.正确答案: D6.ORDER BY只能对表中字段排序.正确答案: C7.TO_DATE用于将字符串转换为日期类型,排除A,C. 转换'20051110 14:44:17'格式的正确语句应该是"select to_char(sysdate,’yyyymmdd hh24:mi:ss’)from dual;"   原题中每个选项都不对(sydate? 应该是sysdate吧)8. SUBSTR(STR,START_INDEX,LEN)函数为从STR中以START_INDEX为开始位置截取LEN位字符,排除A,B,C.  正确答案: D9. DML是数据操作语言(Data Manipulation Language)的缩写,列如:INSERT,UPDATE,DELETE. 正确答案: C,D10. 在ORACLE中连接字符串的符号是双竖线("||"). 正确答案: C

      

  20.   


    #44楼,补充
    关于第5题,并没有指明还有其他语句,所以C,D选项皆可.
    MERGE命令从一个或多个数据源中选择行来updating或inserting到一个或多个表.MERAGE也属于DML  .所以第9题正确答案应是: BCD
      

  21.   

    第8题确实有点阴险,要是将C改成select lower(substr(‘Hello World’,2))from dual;也是可以的,
    这trim和merge不怎么熟悉,总体感觉还是比较基础的,英文只不过是纸老虎罢了.
    想不通既然是英文题目,为啥很多标点符号却是中文的???