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
Any of the single-row functions covered in this chapter can be used with the DUAL table.
True/False
True
The LENGTH function is used to determine the number of rows in a table.
True/False
False
Character functions can be used to change the case of characters or to manipulate characters.
True/False
True
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
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
To calculate the difference between two date columns, you must use the TO_DATE function.
True/False
False
The TO_CHAR function can be used to add a dollar sign ($) to a numeric value.
True/False
True
The NVL2 function allows different options to be selected, based upon whether a NULL value exists.
True/False
True
The LOWER function can be used to display upper-case characters in lower-case.
True/False
True
The ROUND function can be used to truncate numeric data.
True/False
False
When functions are nested, the inner function is solved first.
True/False
True
The TRUNC function can be used to add insignificant zeros to the right of a decimal point for numeric data.
True/False
False
Single-row functions return one row of results for each group or category of rows processed.
True/False
False
The NULLIF function is often combined with the NVL2 function to display a descriptive status.
True/False
True
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
The CONCAT function is used to store the contents of two columns into one column.
True/False
False
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
The NVL function can be used to include records containing null values in calculations.
True/False
True
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
Case conversion functions can only be used in the SELECT clause of a SELECT statement.
True
False
False
The ADD_MONTHS function is used to add one month to a specified date.
True/False
False
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
Only a DATE function can be nested inside another DATE function.
True/False
False
The ROUND function can be used to round numeric data to the left or right of the decimal point.
True/False
True
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
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
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
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
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
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;
The phonetic representation of a character string can be determined using the ____ function.
A. SOUND
B. PHONETIC
C. SOUNDEX
D. SOUNDINDEX
C. SOUNDEX
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
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
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
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
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
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.
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;
Which of the following format elements will display 1:00 p.m. as 13?
A. HH
B. HR
C. HH24
D. 24
C. HH24
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
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
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';
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
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
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
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
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
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
Which of the following keywords will return the value of the date according to the computer?