Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Friday, 20 June 2014

TECHNICAL INTERVIEW QUESTIONS ON SQL / PLSQL-- SET 5





 INTERVIEW QUESTIONS ON SQL / PLSQL-- SET 5


1. The sql statement 

 SELECT  LAPD( 'abcd' ,10, 'wert')  FROM DUAL;

prints

(A) wertweabcd
(B)abcdwertwer
(C)wertwertab
(D)abwertwert



2.The sql statement 

 SELECT ROUND (45.926, -2) FROM DUAL;

(A) is illegal
(B)prints garbage
(C)prints 45.92
(D) prints 0





3.The sql statement 

 SELECT NVL(NVL(NULL, NVL(NULL, 3)) , 4)  FROM DUAL;

prints

(A) 3
(B)4
(C)NULL
(D) IS ILLEAGAL


TECHNICAL INTERVIEW QUESTIONS ON SQL / PLSQL-- SET 3






INTERVIEW QUESTIONS ON SQL / PLSQL-- SET3




1. Almost all the DATE functions return a value of data type DATE , except

(A)MONTHS_BETWEEN
(B)ROUND
(C)NEXT_DAY
(D) TRUNC




2.The SELECT statement 

SELECT LOWER ('AbCd') , UPPER('AbCd'), INITCAP ('AbCd EFgh') FROM DUAL;

will print

(A)abcd ABCD Abcd Efgh
(B)abcd ABCD ABCD EFGH
(C)abcd ABCD abcd efgh
(D)abcd ABCD aBCD eFGH




3.The sql statement

SELECT SUBSTR('123456879' , INSTR( 'bacabcabc' , 'b', 4)) FROM DUAL;

prints

(A)2345
(B)6789
(C)56789
(D)89


TECHNICAL INTERVIEW QUESTIONS ON SQL / PLSQL-- SET 4






INTERVIEW QUESTIONS ON SQL / PLSQL-- SET 4




1. The sql statement

 SELECT LENGTH (' ') FROM DUAL ;  -- ''  is two single quotes

prints

(A)0
(B)a gargabe value
(C)NULL
(D) 1




2.The sql statement

 SELECT INSTR ( 'abcdecfg' , 'c')  FROM DUAL ;

prints

(A)2
(B)3
(C)5
(D) 6




3.The sql statement

 SELECT LPAD ('abcd' ,10,'*') FROM DUAL ;

prints

(A)abcd******
(B)*****abcd
(C)***abcd***
(D) *********



Thursday, 19 June 2014

TECHNICAL INTERVIEW QUESTIONS ON SQL / PLSQL-- SET 1




  
INTERVIEW QUESTIONS ON SQL / PLSQL-- SET 1


1. The sql statement 

NOT BETWEEN 10 AND 20

(A)  Displays NULL values
(B) Does not display NULL values
(C) May display NULL  values
(D)  None of these



2. The sql statement

SELECT SUBSTR('123456789', INSTR('ABCABCABC', 'B' ), 4) FROM DUAL;

prints

(A) 6789
(B) 2345
(C) 1234
(D) 456789



3.Which of the following group functions ignore NULL values ?

(A)  MAX
(B)COUNT
(C) SUM
(D) COUNT(*)


CLICK HERE TO SEE THE ANSWER

ANSWER IS (A) , (B) AND (C)


TECHNICAL INTERVIEW QUESTIONS ON SQL / PLSQL-- SET 2





 INTERVIEW QUESTIONS ON SQL / PLSQL-- SET 2



1. From the following combinations of wildcard characters , choose those that are equivalent.

(A) %
(B) _%
(C) %_
(D) __


CLICK HERE TO SEE THE ANSWER

ANSWER IS (B) AND (C)


2. The sql statement 

SELECT  ROUND (45.926 , -1)  FROM DUAL ;

(A) is illegal
(B) prints garbage 
(C) prints 045.926
(D) prints 50



3. Which of the following must be enclosed in double qoutes?

(A)Dates
(B)Column Alias
(C)Strings
(D) All of these