【OCP-12c】CUUG 071题库考试原题及答案解析(24)

  • choose the best answer
  • In the EMPLOYEES table there are 1000 rows and employees are working in the company for more than 10 years.

    Evaluate the following SQL statement:

    SQL> UPDATE employees

    SET salary = NVL(salary,0) + NVL(comm,0),comm = NVL(comm,0)

    WHERE hire_date < SYSDATE - 600;

    What would be the result?

    A) It gives an error because NVL function cannot be used with UPDATE.

    B) It gives an error because multiple NVL functions are used in an expression.

    C) It executes successfully and updates the records of those employees who have been working in the company for more than 600 days.

    D) It executes successfully but no rows updated.

    Answer:C

    (SQL> update emp

    2 set sal=nvl(sal,0)+nvl(comm,0),comm=nvl(comm,0)

    3 where hiredate < sysdate - 100;

    已更新 14 行。

    )

    原文地址:http://blog.51cto.com/13854012/2352562

    时间: 2024-11-05 10:00:26

    【OCP-12c】CUUG 071题库考试原题及答案解析(24)的相关文章

    【OCP认证12c题库】CUUG 071题库考试原题及答案(25)

    choose the best answer Evaluate the following SQL statement: ALTER TABLE hr.emp SET UNUSED (mgr_id); Which statement is true regarding the effect of the above SQL statement? A) Any views created on the EMP table that include the MGR_ID column would b

    【OCP认证12c题库】CUUG 071题库考试原题及答案(26)

    26.choose two Examine the structure of the PRODUCTS table. Which two statements are true? A) EXPIRY_DATE always stores date and time in character format B) PRICE can store a maximum of eight digits and two decimals. C) PRODUCT_PIC can store only vide

    【OCP认证12c题库】CUUG 071题库考试原题及答案(28)

    28.choose the best answer Evaluate the following SQL statement: SQL> SELECT promo_id, promo_category FROM promotions WHERE promo_category = 'Internet' ORDER BY 2 DESC UNION SELECT promo_id, promo_category FROM promotions WHERE promo_category = 'TV' U

    【OCP认证12c题库】CUUG 071题库考试原题及答案(27)

    27.choose two The SQL statements executed in a user session are as follows: SQL> CREATE TABLE product (pcode NUMBER(2), pname VARCHAR2(10)); SQL> INSERT INTO product VALUES (1, 'pen'); SQL> INSERT INTO product VALUES (2,'pencil'); SQL> SAVEPOI

    【OCP-12c】CUUG 071题库考试原题及答案解析(13)

    13.(6-7) choose twoWhich two statements are true regarding operators used with subqueries? (Choose two.)A) =ANY and =ALL operators have the same functionality.E) The NOT IN operator is equivalent to is NULL.C) The <ANY operator means less than the ma

    【OCP-12c】CUUG 071题库考试原题及答案解析(14)

    14.(6-13) choose the best answer:View the Exhibit and examine the structure of the ORDERS table.Which UPDATE statement is valid? A) UPDATE ordersSET order_date = '12-mar-2007'AND order_total = TO_NUMBER(NULL)WHERE order_id = 2455; B) UPDATE ordersSET

    【OCP-12c】CUUG 071题库考试原题及答案解析(15)

    15.(6-24)choose the best answerExamine the structure of the MEMBERS table:You want to display details of all members who reside in states starting with the letter A followedby exactly one character. Which SQL statement must you execute? A. SELECT * F

    【OCP-12c】CUUG 071题库考试原题及答案解析(16)

    16.(7-5) choose the best answerThe PRODUCTS table has the following structure:Evaluate the following two SQL statements:SQL>SELECT prod_id, NVL2(prod_expiry_date, prod_expiry_date + 15,'')FROM products;SQL>SELECT prod_id, NVL(prod_expiry_date, prod_

    【OCP-12c】CUUG 071题库考试原题及答案解析(18)

    18.(8-7) choose twoWhich two statements are true regarding views? (Choose two.) A) A simple view in which column aliases have been used cannot be updated.B) The OR REPLACE option is used to change the definition of an existing view without droppingan

    【OCP-12c】CUUG 071题库考试原题及答案解析(17)

    17.(7-11) choose twoView the Exhibit and examine the structure of ORDER_ITEMS and ORDERS tables.You need to remove from the ORDER_ITEMS table those rows that have an order status of 0 or 1 inthe ORDERS table.Which two DELETE statements are valid? (Ch