Chapter 10

  1. You must include the MI element in the format argument of a TO_CHAR function to include the minutes when displaying time.

    True/False
    True
  2. Any of the single-row functions covered in this chapter can be used with the DUAL table.

    True/False
    True
  3. The LENGTH function is used to determine the number of rows in a table.

    True/False
    False
  4. Character functions can be used to change the case of characters or to manipulate characters.

    True/False
    True
  5. The DECODE function allows the user to specify different actions to be taken, depending on the value being used for the comparison.

    True/False
    True
  6. To indicate that the numeric value of the day of the year for a date is being specified, include DAY in format argument of the TO_DATE function.

    True/False
    False
  7. To calculate the difference between two date columns, you must use the TO_DATE function.

    True/False
    False
  8. The TO_CHAR function can be used to add a dollar sign ($) to a numeric value.

    True/False
    True
  9. The NVL2 function allows different options to be selected, based upon whether a NULL value exists.

    True/False
    True
  10. The LOWER function can be used to display upper-case characters in lower-case.

    True/False
    True
  11. The ROUND function can be used to truncate numeric data.

    True/False
    False
  12. When functions are nested, the inner function is solved first.

    True/False
    True
  13. The TRUNC function can be used to add insignificant zeros to the right of a decimal point for numeric data.

    True/False
    False
  14. Single-row functions return one row of results for each group or category of rows processed.

    True/False
    False
  15. The NULLIF function is often combined with the NVL2 function to display a descriptive status.

    True/False
    True
  16. The LTRIM function can be used to remove a specific number of characters from the left side of a set of data.

    True/False
    False
  17. The CONCAT function is used to store the contents of two columns into one column.

    True/False
    False
  18. The NEXT_DAY function is used to determine the next occurrence of a specific day of the week that will occur after the specified date.

    True/False
    True
  19. The NVL function can be used to include records containing null values in calculations.

    True/False
    True
  20. The NEXT_DATE function is used to determine the next occurrence of a specific day of the week after a given date.

    True/False
    False
  21. Case conversion functions can only be used in the SELECT clause of a SELECT statement.

     

    True


    False
    False
  22. The ADD_MONTHS function is used to add one month to a specified date.

    True/False
    False
  23. The RTRIM function can be used to remove a specific set of characters from the right side of a set of data values.

    True/False
    True
  24. Only a DATE function can be nested inside another DATE function.

    True/False
    False
  25. The ROUND function can be used to round numeric data to the left or right of the decimal point.

    True/False
    True
  26. Which of the following functions will truncate a numeric value to a specific position?

    A. TRUNCATE

    B. TRUNC

    C. TRUND

    D. none of the above
    B. TRUNC
  27. Which of the following functions can be used to determine the next occurrence of a specific day of the week after a given date?




    A. NEXT_DAY
  28. When a format argument is included in a function, it must be enclosed in ____.

    A. single quotation marks

    B. double quotation marks

    C. parentheses

    D. percent signs
    A. single quotation marks
  29. Which of the following can be used to replace a specific set of characters with another set of characters?

    A. SUBSTR

    B. REPLACE

    C. FNDRPLCE

    D. none of the above
    B. REPLACE
  30. The TO_CHAR function can be used to format what types of data?

    A. numeric

    B. date

    C. numeric and date

    D. no formatting can be performed
    C. numeric and date
  31. Based upon the contents of the ORDERS table, which of the following SQL statements will display only those orders shipped to the zip code zone that begins with 323?

    A. SELECT order#, SUBSTR(shipzip, 1, 323)
        FROM orders;

    B.SELECT order#, SUBSTR(shipzip, 1, 323)
       FROM orders
       WHERE shipzip = 323;

    C.SELECT order#
       FROM orders
       WHERE shipzip = SUBSTR(shipzip, 1, 323);

    D. SELECT order#
        FROM orders
        WHERE SUBSTR(shipzip, 1, 3) = 323;
    • D. SELECT order#
    •     FROM orders
    •     WHERE SUBSTR(shipzip, 1, 3) = 323;
  32. The phonetic representation of a character string can be determined using the ____ function.

    A. SOUND

    B. PHONETIC

    C. SOUNDEX

    D. SOUNDINDEX
    C. SOUNDEX
  33. What is the maximum number of columns or character strings that can be combined through a single CONCAT function?

    A. two

    B. three

    C. four

    D. eight
    A. two
  34. Which of the following represents the number of days that have passed since January 1, 4712 B.C.?

    A. Cartesian date

    B. Julian date

    C. Extended date

    D. none of the above
    B. Julian date
  35. Which of the following functions can be used to substitute another value for a NULL value during calculations?

    A. NVL

    B. NULLVAL

    C. NULVAL

    D. NLV
    A. NVL
  36. Which of the following functions will convert the first letter of each word to an upper-case letter and the remaining letters of the word to lower-case letters?

    A. INITIALCAPITAL

    B. INITIALCAP

    C. UPPERFIRST

    D. none of the above
    D. none of the above
  37. Which of the following is a table provided in Oracle which can be helpful for testing functions?

    A. DUMMY

    B. DUM

    C. DUAL

    D. EMPTY
    C. DUAL
  38. Which of the following is an accurate statement?

    A. When the LOWER function is used in a SELECT clause, it will automatically store the data in lower-case letters in the database table.

    B. When the LOWER function is used in a SELECT clause, the function stays in effect for the remainder of that user's session.

    C. When the LOWER function is used in a SELECT clause, the function only stays in effect for the duration of that SQL statement.

    D. none of the above
    C. When the LOWER function is used in a SELECT clause, the function only stays in effect for the duration of that SQL statement.
  39. Based upon the contents of the CUSTOMERS table, which of the following will display the shipping location as: City, State Zip

    A. SELECT INITCAP(CONCAT(city, CONCAT(',', CONCAT(state,CONCAT(' ', zip)))))
        FROM customers;

    B. SELECT CONCAT(city, CONCAT(', ',CONCAT(state, CONCAT(' ', CONCAT(zip)))))
        FROM customers;

    C. SELECT INITCAP(CONCAT(city, ', ', state, ' ', zip))
        FROM customers;

    D. none of the above
    • A. SELECT INITCAP(CONCAT(city, CONCAT(', ', CONCAT(state, CONCAT(' ', zip)))))
    •     FROM customers;
  40. Which of the following format elements will display 1:00 p.m. as 13?

    A. HH

    B. HR

    C. HH24

    D. 24
    C. HH24
  41. Which of the following functions can be used to fill a character string to a specific width?

    A. LPAD

    B. RPAD

    C. LFILL

    D. both a and b
    D. both a and b
  42. Which of the following SQL statements will return an error message, based upon the contents of the CUSTOMERS table?

    A. SELECT CONCAT(firstname, lastname)
        FROM customers;

    B. SELECT INITCAP(lastname), INITCAP(firstname)
        FROM customers;

    C. SELECT LENGTH(customer#)
        FROM customers;

    D. none of the above
    D. none of the above
  43. Which of the following statements will display the value of FL assigned to the state column as FLORIDA?

    A. SELECT customer#, city,
        SUBSTR(state, 'FL', 'FLORIDA')
        FROM customers
        WHERE state = 'FL';

    B. SELECT customer#, city,
        SUBSTR( 'FL', 'FLORIDA')
        FROM customers
        WHERE state = 'FL';

    C. SELECT customer#, city,
        REPLACE( 'FL', 'FLORIDA')
        FROM customers
        WHERE state = 'FL';

    D. SELECT customer#, city,
        REPLACE(state, 'FL', 'FLORIDA')
        FROM customers
        WHERE state = 'FL';
    • D. SELECT customer#, city,
    •     REPLACE(state, 'FL', 'FLORIDA')
    •     FROM customers
    •     WHERE state = 'FL';
  44. Which of the following format argument elements will display the number of seconds past midnight?

    A. SS

    B. SSSS

    C. MI:SS

    D. MI
    B. SSSS
  45. The ____ function can be used to convert dates and numbers to a formatted character string.

    A. TO_DATE

    B. CONVERT

    C. FORMATMODEL

    D. TO_CHAR
    D. TO_CHAR
  46. Which of the following functions is used to determine the number of months between two date values?

    A. MONTH_BETWEEN

    B. MONTHS_BETWEEN

    C. MTH_BETWEEN

    D. MNTH_BETWEEN
    B. MONTHS_BETWEEN
  47. Which of the following functions can be used to convert a character string to upper-case letters?

    A. UPPER

    B. UP

    C. UPPERCASE

    D. UPPERCAP
    A. UPPER
  48. Which of the following functions determines the number of characters in a character string?

    A. COUNT

    B. NUMBER

    C. LENGTH

    D. none of the above
    C. LENGTH
  49. If a SELECT statement includes SUBSTR (TO_CHAR(SYSDATE, 'fmMONTH DD, YYYY'), -4, 4) in the SELECT clause, which of these functions will be executed first?

    A. TO_CHAR

    B. SUBSTR

    C. MONTH

    D. YYYY
    A. TO_CHAR
  50. Which of the following keywords will return the value of the date according to the computer?

    A. SYSTEMDATE

    B. SYSDATE

    C. DATE

    D. DATESYS
    B. SYSDATE
Author
Lencha
ID
325795
Card Set
Chapter 10
Description
Chapter 10
Updated