Extras din notiță
1. Which SQL function can be used to remove heading or trailing characters (or both) from a character string? Mark for Review
(1) Points
LPAD
CUT
NVL2
TRIM (*)
Correct
2. Which three statements about functions are true? (Choose three.) Mark for Review
(1) Points
(Choose all correct answers)
The SYSDATE function returns the Oracle Server date and time. (*)
The ROUND number function rounds a value to a specified decimal place or the nearest whole number. (*)
The CONCAT function can only be used on character strings, not on numbers.
The SUBSTR character function returns a portion of a string beginning at a defined character position to a specified length. (*)
Correct
You query the database with this SQL statement:
SELECT LOWER(SUBSTR(CONCAT(last_name, first_name)), 1, 5) "ID"
FROM employee;
In which order are the functions evaluated?
Mark for Review
(1) Points
LOWER, SUBSTR, CONCAT
LOWER, CONCAT, SUBSTR
SUBSTR, CONCAT, LOWER
CONCAT, SUBSTR, LOWER (*)
Correct
4. The STYLES table contains this data:
STYLE_ID STYLE_NAME CATEGORY COST
895840 SANDAL 85940 12.00
968950 SANDAL 85909 10.00
869506 SANDAL 89690 15.00
809090 LOAFER 89098 10.00
890890 LOAFER 89789 14.00
857689 HEEL 85940 11.00
758960 SANDAL 86979 11.00
You query the database and return the value 40. Which script did you use?
Mark for Review
(1) Points
SELECT INSTR(category, 2,2)
FROM styles
WHERE style_id = 895840;
SELECT INSTR(category, -2,2)
FROM styles
WHERE style_id = 895840;
SELECT SUBSTR(category, 2,2)
FROM styles
WHERE style_id = 895840;
(*)
SELECT SUBSTR(category, -2,2)
FROM styles
WHERE style_id = 758960;
Correct
You issue this SQL statement:
SELECT INSTR ('organizational sales', 'al')
FROM dual;
Which value is returned by this command?
Mark for Review
(1) Points
1
2
13 (*)
17
Correct
6. You need to display the number of characters in each customer's last name. Which function should you use? Mark for Review
(1) Points
LENGTH (*)
LPAD
COUNT
SUBSTR
Correct
7. What will the following SQL statemtent display?
SELECT last_name, LPAD(salary, 15, '$')SALARY
FROM employees;
Mark for Review
(1) Points
Preview document
Conținut arhivă zip
- Raspunsuri Oracle Mid Exam.doc