GoConqr has a new look! Let us know what you think.

Quiz

QUIZ 5

Claudia Piscociu 15 questions

Take the quiz

Questions in this quiz (15)

  1. 1You have been asked to create a report that lists all customers who have placed orders of at least $2,500. The report's date should be displayed using this format:
    Day, Date Month, Year (For example, Tuesday, 13 April, 2004 ).
    Which statement should you issue?
    1. ASELECT companyname, TO_CHAR (sysdate, 'fmdd, dy month, yyyy'), total
      FROM customers NATURAL JOIN orders
      WHERE total >= 2500;
    2. BSELECT companyname, TO_DATE (sysdate, 'dd, dy month, yyyy'), total
      FROM customers NATURAL JOIN orders
      WHERE total >= 2500;
    3. CSELECT companyname, TO_CHAR (sysdate, 'fmDay, dd Month, yyyy'), total
      FROM customers NATURAL JOIN orders
      WHERE total >= 2500;
    4. DSELECT companyname, TO_DATE (date, 'day, dd month, yyyy'), total
      FROM customers NATURAL JOIN orders
      WHERE total >= 2500;
  2. 2Which two statements concerning SQL functions are true? (Choose two.)
    1. ASingle-row functions manipulate groups of rows to return one result per group of rows.
    2. BCharacter functions can accept numeric input.
    3. CNot all date functions return date values.
    4. DNumber functions can return number or character values.
    5. EConversion functions convert a value from one data type to another data type.
  3. 3If you use the RR format when writing a query using the date 27-Oct-17 and the year is 2001, what year would be the result?
    1. A1901
    2. B2001
    3. C2017
    4. D1917
  4. 4Which arithmetic operation will return a numeric value?
    1. ASYSDATE + 30 / 24
    2. BSYSDATE - 6
    3. CNEXT_DAY(hire_date) + 5
    4. DTO_DATE('01-Jun-2004') - TO_DATE('01-Oct-2004')
  5. 5 Which best describes the TO_CHAR function?
    1. AThe TO_CHAR function can be used to display dates and numbers according to formatting conventions that are supported by Oracle.
    2. BThe TO_CHAR function can be used to remove text from column data that will be returned by the database.
    3. CThe TO_CHAR function can be used to specify meaningful column names in an SQL statement's result set.
    4. DThe TO_CHAR function can only be used on Date columns.
  6. 6All Human Resources data is stored in a table named EMPLOYEES. You have been asked to create a report that displays each employee's name and salary. Each employee's salary must be displayed in the following format: $000,000.00. Which function should you include in a SELECT statement to achieve the desired result?
    1. ATO_CHAR
    2. BTO_NUMBER
    3. CCHARTOROWID
    4. DTO_DATE
  7. 7Consider the following data in the Employees table: (last_name, commission_pct, manager_id)
    DATA:
    King, null, null
    Kochhar, null, 100
    Vargas, null, 124
    Zlotkey, .2, 100
    What is the result of the following statement:
    SELECT last_name, COALESCE(commission_pct, manager_id, -1) comm
    FROM employees ;
    1. AKing, -1
      Kochhar, 100
      Vargas, 124
      Zlotkey, 100
    2. BKing, null
      Kochhar, 100
      Vargas, 124
      Zlotkey, .2
    3. CKing, -1
      Kochhar, 100
      Vargas, 124
      Zlotkey, .2
    4. DStatement will fail
  8. 8If quantity is a number datatype, what is the result of this statement?
    SELECT NVL(200/quantity, 'zero') FROM inventory;
    1. ANull
    2. Bzero
    3. CThe statement fails.
    4. DZERO
  9. 9You need to replace null values in the DEPT_ID column with the text N/A. Which functions should you use?
    1. ATO_CHAR and NULLIF
    2. BTO_NUMBER and NULLIF
    3. CTO_CHAR and NULL
    4. DTO_CHAR and NVL
  10. 10The PRODUCT table contains this column: PRICE NUMBER(7,2)
    Evaluate this statement:
    SELECT NVL(10 / price, '0')
    FROM PRODUCT;

    What would happen if the PRICE column contains null values?
    1. AThe statement would fail because values cannot be divided by 0.
    2. BA value of 10 would be displayed.
    3. CA value of 0 would be displayed.
    4. DThe statement would fail because values cannot be divided by null.

Information

Description
Quiz on QUIZ 5, created by Claudia Piscociu on 14/01/2017.
Language
English
Views
9
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?