神州数码面试题求解
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)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.“|”
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?
我没有用过oracle都给人家评错了
是DDL语法。
select语句也没有说是oracle
SQL版那么多大牛。你让哥情何以堪。
难道在SELECT 前?WHERE 前后?
第4题应该选e才对,
问题是问group by子句在select语句中放置的位置,
group by应该放在select子句后面,
如:select name from Product where productId > 5 group by productId
也难怪面试的是SQL
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是关键字,取系统时间
2.C,?
3.B,E
4.E
5.C
6.A
7.D
8.C
9.C,D
10.C
第三题我试了一下,应该选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
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
#44楼,补充
关于第5题,并没有指明还有其他语句,所以C,D选项皆可.
MERGE命令从一个或多个数据源中选择行来updating或inserting到一个或多个表.MERAGE也属于DML .所以第9题正确答案应是: BCD
这trim和merge不怎么熟悉,总体感觉还是比较基础的,英文只不过是纸老虎罢了.
想不通既然是英文题目,为啥很多标点符号却是中文的???