杭州-SQL杭州国迈软件有限公司笔试题

  1. Which SELECT statement will get the result ‘elloworld’ from the string ‘HelloWorld’?
    A. SELECT SUBSTR( ‘HelloWorld’,1) FROM dual;
    B. SELECT INITCAP(TRIM (‘HelloWorld’, 1,1)) FROM dual;
    C. SELECT LOWER(SUBSTR(‘HelloWorld’, 1, 1) FROM dual;
    D. SELECT LOWER(SUBSTR(‘HelloWorld’, 2, 1) FROM dual;
    E. SELECT LOWER(TRIM (‘H’ FROM ‘HelloWorld’)) FROM dual;

ANS: E

  1. Which two statements are true regarding the ORDER BY clause? (Choose two.)
    A. The sort is in ascending order by default.
    B. The sort is in descending order by default.
    C. The ORDER BY clause must precede the WHERE clause.
    D. The ORDER BY clause is executed on the client side.
    E. The ORDER BY clause comes last in the SELECT statement.
    F. The ORDER BY clause is executed first in the query execution.

ANS: A E

  1. Which two tasks can you perform using only the TO_CHAR function? (Choose two.)
    A. convert 10 to ‘TEN’
    B. convert ‘10’ to 10
    C. convert ‘10’ to ‘10’
    D. convert ‘TEN’ to 10
    E. convert a date to a character expression
    F. convert a character expression to a date

ANS: C E

  1. Which operator can be used with a multiple-row subquery?
    A. =
    B. LIKE
    C. BETWEEN
    D. NOT IN
    E. Is
    F. <>

ANS: D

  1. Which three statements about subqueries are true? (Choose three.)
    A. A single row subquery can retrieve only one column and one row.
    B. A single row subquery can retrieve only one row but many columns
    C. A multiple row subquery can retrieve multiple rows and multiple columns.
    D. A multiple row subquery can be compared using the “>” operator.
    E. A single row subquery can use the IN operator.
    F. A multiple row subquery can use the “=” operator.

ANS: A D E

  1. Based on the following conditions, which of the following will make a true condition?
    last_name LIKE Ma%

A. MADNESS
B. Man
C. MARY
D. mary
E. Mandy

ANS: B E

  1. Which of the following SQL statements can calculate and return the absolute value of -33?

A. SELECT ABS(-33) “Absolute” FROM DUAL;
B. SELECT ABS(-33), Absolute FROM DUAL;
C. SELECT ABS("-33") Absolute FROM DUAL;

ANS: A

  1. What does the following SQL script do?
    SELECT AVG(MAX(salary)) FROM employees GROUP BY department_id;

A. it has a syntax error, the AVG clause is not valid
B. it calculates the average of the maximum salaries of all the departments
C. it has a syntax error, the MAX clause is not valid
D. it has no error, but the GROUP BY clause is not effective
E. it has no error, but the AVG clause is not effective
F. it has no error, but the MAX clause is not effective

ANS: B

  1. Which three SELECT statements display 2000 in the format "
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值