25-08-2017, 09:32 PM
Data type- Question & Answers
Data type- Question & Answers.doc (Size: 24.5 KB / Downloads: 65)
1. Which SELECT statement will get the result 'elloworld' from the string 'HelloWorld'?
A. SELECT SUBSTR( 'HelloWorld',1) FROM dual;
B. SELECT INITCAP(TRIM ('HelloWorld', 1,1)) FROM dual;
C. SELECT LOWER(SUBSTR('HelloWorld', 1, 1) FROM dual;
D. SELECT LOWER(SUBSTR('HelloWorld', 2, 1) FROM dual;
E. SELECT LOWER(TRIM ('H' FROM 'HelloWorld')) FROM dual;
ANS: E
2. In which case would you use a FULL OUTER JOIN?
A. Both tables have NULL values.
B. You want all unmatched data from one table.
C. You want all matched data from both tables.
D. You want all unmatched data from both tables.
E. One of the tables has more data than the other.
F. You want all matched and unmatched data from only one table.
ANS: D
3. In which scenario would an index be most useful?
A. The indexed column is declared as NOT NULL.
B. The indexed columns are used in the FROM clause.
C. The indexed columns are part of an expression.
D. The indexed column contains a wide range of values.
ANS: D
4. Which operator can be used with a multiple-row subquery?
A. =
B. LIKE
C. BETWEEN
D. NOT IN
E. Is
F. <>
ANS: D
5. You are granted the CREATE VIEW privilege. What does this allow you to do?
A. Create a table view.
B. Create a view in any schema.
C. Create a view in your schema.
D. Create a sequence view in any schema.
E. Create a view that is accessible by everyone.
F. Create a view only if it is based on tables that you created.
ANS: C
6. What will happen if you call a SQL function with an argument of a datatype other than the datatype
expected by a SQL function?
A. the argument will need to be converted explicitly
B. the argument will be rejected
C. the argument will be accepted as is
D. the argument will be converted implicitly
ANS: A
7. Which of the following correctly describe the aggregate functions?
A. None of the choices.
B. It returns a single result row based on single rows
C. It can only appear in ORDER BY clauses
D. It returns a single result row based on groups of rows
E. It cannot appear in select lists
ANS: D
8. In which scenario would TOP N analysis be the best solution?
A. You want to identify the most senior employee in the company.
B. You want to find the manager supervising the largest number of employees.
C. You want to identify the person who makes the highest salary for all employees.
D. You want to rank the top three sales representatives who have sold the maximum number of products.
ANS: D
9. 15. Which substitution variable would you use if you want to reuse the variable without prompting the user each time?
A. &
B. ACCEPT
C. PROMPT
D. &&
ANS: D
10. 17. Which statement describes the ROWID data type?
A. Binary data up to 4 gigabytes.
B. Character data up to 4 gigabytes.
C. Raw binary data of variable length up to 2 gigabytes.
D. Binary data stored in an external file, up to 4 gigabytes.
E. A hexadecimal string representing the unique address of a row in its table.
ANS: E