0

databases Online Quiz - 84

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

How many rows records the following query will display.. select * from TEMP where rownum in (1,3,3,2) N.R. Temp table has 30 records

  1. NULL

  2. 1 row

  3. 3 rows

  4. 4 rows

  5. 0 row


Correct Option: C

select '1'+'1' from dual ; The o/p would be..

  1. 2

  2. 1+1

  3. Error: invalid number

  4. Error: invalid Character

  5. Error: invalid identifier


Correct Option: A

The o/p of the below two queries would be same.. 1.select '1'+1 from dual; 2.select 1+1 from dual;

  1. True

  2. False


Correct Option: A

O/p of the below query ?? select 'a''a' from dual;

  1. aa

  2. a a

  3. a'a

  4. Error: invalid identifier

  5. Error: invalid character


Correct Option: C

select "aa" from dual ?

  1. Error: "aa":invalid identifier

  2. aa

  3. "aa"

  4. Error: invalid character


Correct Option: A

select dummy from dual ?

  1. NULL

  2. Error: invalid identifier

  3. X

  4. Error: invalid SQL Statemet

  5. A


Correct Option: C

select * from dual ?

  1. A

  2. X

  3. NULL

  4. Error: Invalid SQL statement

  5. Error: Invalid Identifier


Correct Option: B

select dummy from dual minus select * from dual what would be output ?

  1. No rows returned

  2. Error: invalid SQL statement

  3. Error: invalid identifier

  4. Error: syntax error

  5. 1 row


Correct Option: A
  1. Error: "VERSION": invalid identifier

  2. Error: "VERSION": invalid character

  3. Error: invalid SQL statement

  4. shows oracle database version

  5. Null


Correct Option: A

select expr(1/0) from dual; The o/p would be ..

  1. 0

  2. Error: divisor is equal to zero

  3. Error: Invalid Identifier

  4. NULL


Correct Option: C

Output of the below two queries will be same.. 1.select nvl('abc','a') from dual; 2.select nvl('abc',0) from dual;

  1. True

  2. False


Correct Option: A

The o/p of the below query would be.. select nvl('abc','a') from dual union all select nvl('abc',0) from dual minus select replace('abc','a','a') from dual

  1. No rows returned

  2. abc

  3. Two rows of value 'abc'

  4. Error: Syntax error


Correct Option: A

select instr('Hi Partha Sarathi Ojha','a',6,-1) from dual; The output would be..

  1. Error: Syntax error

  2. 0

  3. 5

  4. Error: Argument '-1' is out of range


Correct Option: D

select instr('Hi Partha Sarathi Ojha','a',5) from dual; The o/p would be...

  1. 5

  2. 9

  3. 22

  4. 0


Correct Option: A

Want to search character 'a' from last in the string 'Hi Partha Sarathi Ojha'. So what would be the query...

  1. select instr('Hi Partha Sarathi Ojha',last,'a') from dual

  2. select instr('Hi Partha Sarathi Ojha','a',-1) from dual

  3. select instr('Hi Partha Sarathi Ojha',left,'a') from dual

  4. select instr('Hi Partha Sarathi Ojha',-1,'a') from dual

  5. select instr('Hi Partha Sarathi Ojha','-a') from dual


Correct Option: B

select translate('abcda','ab','ef') from dual; The o/p would be...

  1. efcda

  2. efcde

  3. ef

  4. ab

  5. 1


Correct Option: B

select replace('abcda','ab','ef') from dual ; The o/p would be..

  1. efcda

  2. efcde

  3. ef

  4. ab

  5. 1


Correct Option: A

The o/p of the below two queries will be same ? 1.select translate('abcd','a','d') from dual; 2.select replace('abcd','a','d') from dual;

  1. True

  2. False


Correct Option: A

The o/p of the below query.. select 1/0 from dual ;

  1. Error: Syntax error

  2. INFINITY

  3. NULL

  4. 0

  5. Error: divisor is equal to zero


Correct Option: E

The o/p of the below query.. select 0/1 from dual group by dummy;

  1. 0

  2. 1

  3. NULL

  4. Error: divisor is equal to zero

  5. Error: Not a GROUP BY clause


Correct Option: A
- Hide questions