Sei sulla pagina 1di 3

Which number function may be used to determine if a value is odd or even?

MOD

Which arithmetic operation will return a numeric value?

TO_DATE('01-Jun-2004') - TO_DATE('01-Oct-2004')

Sysdate is 12-May-2004. You need to store the following date: 7-Dec-89 

Which statement about the date format for this value is true?
The RR date format will interpret the year as 1989, and the YY date format will
interpret the year as 2089

The PRODUCT table contains this column: 


PRICE NUMBER(7,2)
Evaluate this statement:
SELECT NVL(10 / price, '0')
FROM PRODUCT;
What would happen if the PRICE column contains null values?
A value of 0 would be displayed.

You issue this SQL statement:

SELECT INSTR ('organizational sales', 'al') 


FROM dual;

Which value is returned by this command?


13

You issue this SQL statement:

SELECT TRUNC(751.367, -1) 


FROM dual;

Which value does this statement display?


750

Columns with the same names must have compatible data types

Columns with the same name and datatype.


Hierarchical queries can walk both Top-Down and Bottom-Up.

'True'.

Evaluate this function: MOD (25, 2) Which value is returned?

 1

If you use the RR format when writing a query using the date 27-Oct-17 and the year
is 2001, what year would be the result?

2017

Which comparison operator retrieves a list of values?

IN

You need to join all the rows in the EMPLOYEES table to all the rows in the
EMP_REFERENCE table. Which type of join should you create?

 A cross join

Evaluate this SELECT statement:


  
SELECT *
FROM employee e, employee m
WHERE e.mgr_id = m.emp_id;

Which type of join is created by this SELECT statement?


A self join
Table aliases MUST be used with columns referenced in the JOIN USING clause.

 'False'.

Which functions can be used to manipulate number or date column values, but NOT
character column values?

TRUNC, ROUND

You need to subtract three months from the current date. Which function should you
use?

ADD_MONTHS

All Human Resources data is stored in a table named EMPLOYEES. You have been
asked to create a report that displays each employee's name and salary. Each
employee's salary must be displayed in the following format: $000,000.00. Which
function should you include in a SELECT statement to achieve the desired result?

TO_CHAR

Which character manipulation function always returns a numerical value?

 LENGTH
Character functions accept character arguments and only return character values.

'False'.

Which SELECT statement will return a numeric value?

SELECT (SYSDATE - hire_date) / 7 


FROM employees

Which SQL function is used to return the position where a specific character string
begins within a larger character string?

INSTR

CASE and DECODE evaluate expressions in a similar way to IF-THEN-ELSE logic.


However, DECODE is specific to Oracle syntax.

'True'.

The following statement returns 0 (zero).

SELECT 121 / NULL


FROM dual;
 'False'.

Which of the following is a conditional expression used in SQL?

CASE

Which statement about a natural join is true?

Columns with the same names must have the same precision and datatype.

The primary advantage of using JOIN ON is:

 It permits columns with different names to be joined.

The keywords JOIN _____________ should be used to join tables with the same
column names but different datatypes.

USING

You need to display each employee's name in all uppercase letters. Which function
should you use?

UPPER

Hierarchical queries MUST use the LEVEL pseudo column.

'False'.

Which SELECT statement will NOT return a date value?

 SELECT (SYSDATE - hire_date) + 10 * 8 


FROM employees

Potrebbero piacerti anche