6.
You issue the following query:
SELECT salary "Employee Salary"
FROM employees;
SELECT salary "Employee Salary"
FROM employees;
- [A]EMPLOYEE SALARY
- [B]EMPLOYEE_SALARY
- [C]Employee Salary
- [D]employee_salary
- Answer & Explanation
- Report
Answer : [C]
Explanation :
Explanation :
Column alias names enclosed in quotation marks will appear as typed. Spaces and mixed case appear in the column alias name only when the alias is enclosed in double quotation marks. |
7.
In the following SELECT statement, which component is a literal? (Choose all that apply.)
SELECT 'Employee Name: ' || ename
FROM emp where deptno = 10;
SELECT 'Employee Name: ' || ename
FROM emp where deptno = 10;
- [A]10
- [B]ename
- [C]Employee name;
- [D]||
- Answer & Explanation
- Report
Answer : [A, C]
Explanation :
Explanation :
Character literals in the SQL statement are enclosed in single quotation marks. Literals are concatenated using ||. Employee Name: is a character literal, and 10 is a numeric literal. |
8.
When you try to save 34567.2255 into a column defined as NUMBER(7,2), what value is
actually saved?
- [A]34567.00
- [B]34567.23
- [C]34567.22
- [D]3456.22
- Answer & Explanation
- Report
Answer : [B]
Explanation :
Explanation :
Since the numeric column is defined with precision 7 and scale 2, you can have five digits in the integer part and two digits after the decimal point. The digits after the decimal are rounded. |
9.
What is the default display length of the DATE datatype column?
- [A]18
- [B]9
- [C]19
- [D]6
- Answer & Explanation
- Report
Answer : [B]
Explanation :
Explanation :
The default display format of DATE column is DD-MON-YY, whose length is 9. |
10.
Which clause in a query limits the rows selected?
- [A]ORDER BY
- [B]WHERE
- [C]SELECT
- [D]FROM
- Answer & Explanation
- Report
Answer : [B]
Explanation :
Explanation :
The WHERE clause is used to limit the rows returned from a query. The WHERE clause condition is evaluated, and rows are returned only if the result is TRUE. The ORDER BY clause is used to display the result in certain order. |