0

databases Online Quiz - 226

Description: databases Online Quiz - 226
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

Which section of a PL/SQL block commences with the BEGIN keyword?

  1. Exception

  2. Executable

  3. Declarative

  4. Anonymous


Correct Option: B

Which constraint can be defined only at the column level?

  1. UNIQUE

  2. NOT NULL

  3. CHECK

  4. PRIMARY KEY


Correct Option: C

SELECT TO_CHAR(1000000, '$99,999.00') SALARY FROM dual What Is the Output?

  1. NNNNNNN

  2. ########

  3. 1000000

  4. 1000000.00


Correct Option: B

What is the output in RR format for following dates Date Specified :27-Oct-1995

  1. 2017

  2. 1917

  3. 1900

  4. 2000


Correct Option: B

The outer and inner queries can get data from different tables?

  1. True

  2. False


Correct Option: A

Which statement describes the ROWID data type?

  1. binary data up to 4 gigabytes

  2. character data up to 4 gigabytes

  3. a hexadecimal string representing the unique address of a row in its table

  4. raw binary data of variable length up to 2 gigabytes


Correct Option: C

What will be the output of following Select 8 from Emp ? Emp table has 10 rows

  1. No Rows returned

  2. 10 rows of Emp table

  3. Error

  4. 8 is displayed 10 times


Correct Option: D
  1. TRUNC=To_Date('09-Jan-02,DD-MON-YY,'YEAR',"Date" from Dual;

  2. Select TRUNC(To_Date('09-Jan-02,DD-MON-YY,YEAR')) "DATE" from Dual;

  3. Date =TRUNC(To_DATE('09-Jan-02','DD-MON-YY'),'YEAR'),'YEAR)"DATE: from DUAL;

  4. SELECT TRUNC(TO_DATE('12-Feb-99','DD-MON-YY'), 'YEAR') "Date " FROM DUAL;


Correct Option: D

How many join conditions should be there to avoid a Cartesian Join for joining three tables?

  1. 1

  2. 2

  3. 3

  4. None of these


Correct Option: D

Examine the code given below: SELECT employee_id FROM employees WHERE commission_pct=.5 OR salary > 23000 Which of the following statement is correct with regard to this code?

  1. It returns employees who have 50% of the salary greater than $23,000:

  2. It returns employees who have 50% commission rate or salary greater than $23,000:

  3. It returns employees who have 50% of salary less than $23,000:

  4. None of the above


Correct Option: B
  1. Convert '10'to 10

  2. Convert 10 to '10'

  3. Convert 'TEN' to 10

  4. Convert a date to a character expression


Correct Option: B,D
  1. SELECT SUBSTR ('HelloWorld',1) FROM dual;

  2. SELECT LOWER (SUBSTR ('HellowWorld', 2,1) FROM dual;

  3. SELECT LOWER (SUBSTR('HellowWorld', 2,1) FROM dual;

  4. SELECT LOWER (TRIM ('H' FROM 'Hello World')) FROM dual;


Correct Option: D
  1. Immediately after the SELECT clause

  2. Before the WHERE clause

  3. After the ORDER BY clause

  4. After the WHERE clause


Correct Option: D

Which operators can be used in an outer join condition?

  1. =

  2. OR

  3. IN

  4. AND


Correct Option: A,D
- Hide questions