You are on page 1of 8

-------------------------------------ORACLE------------------------------------------

1. How many number of triggers can be created on a table?

A) 1

B) 12

C) Any number

D) None of above

Ans : C

2.What is an IMPLICIT CURSOR in oracle

A) Cursor created by programmer in pl-sql block


B) Cursor created by oracle to execute any SQL/DML statement
C) Cursor created to handle commit operatios
D) ALL of the above

Ans : B

3. What are database links used for

A) To connect from schema A to schema B in same database


B) To connect from schema A to schema B in other database
C) To connect from schema A to schema A in other database
D ALL of the above

Ans : B

4. Consider below pl-sql block and answer

DECLARE
A NUMBER := 10;
B VARCHAR2(16);
BEGIN
dbms_output.put_line('I am fine 1');
DECLARE
A1 INT := 100;
B1 VARCHAR2(16);
BEGIN
dbms_output.put_line('I am fine 2');
A1 := A1*10;
dbms_output.put_line('A1 =' ||A1);
EXCEPTION
WHEN others THEN
dbms_output.put_line('Exception in Inner BLOCK');
END;
EXCEPTION
WHEN others THEN
dbms_output.put_line('Exception in Outer BLOCK');
END;

A) I am fine1
Exception in Outer BLOCK

B) I am fine1
I am fine2
A1 = 1000

C) I am fine1
Exception in Inner BLOCK

D) None of Above

Ans : A

5. What is call by reference in pl-sql subprograms

A) Passing actual values of variables while calling subprogram


B) Passing another variable which has value already defined above
C) Have to use a constant rather than variable
D) Actual parameter's address is passed in call

Ans : D

6. Consider following table tab1

ID GRADE NAME
11 A+ CHRIS
22 A JAMES
33 A AMIT
NULL NULL SRIDHAR
0 NULL RAHUL

SELECT * FROM tab1


WHERE 0 in (SELECT id FROM tab1 WHERE id in (0))

A) 0 NULL RAHUL

B) NULL NULL SRIDHAR


0 NULL RAHUL

C) 11 A+ CHRIS
22 A JAMES
33 A AMIT
NULL NULL SRIDHAR
0 NULL RAHUL

D) None of above

Ans : C
7. What is a REF_CURSOR in pl-sql

A) A vaiable that is defined as cursor type.


B) A cursor that refer to another cursor.
C) A cursor that refer to another pl-sql object
D) None of above

Ans : A

8. What's correct about IN and OUT parameters in pl-sql subprograms

A) IN is used pass values of ACTUAL parameters into FORMAL parameters, while OUT is used to
receive values of FORMAL parameters after computation.

B) IN is call by reference , while OUT is call by value mostly

C) OUT can be made call by reference using NOCOPY hint.

D) ALL of above

Ans : D

9. In pl-sql tables what NEXT method return

A) Value at next position


B) Index for next position
C) ERROR at next position
D) None

Ans : B

10.VARRAY a pl-sql composite data type has an upper limit

A) TRUE
B) FALSE

Ans : A

11. NESTED TABLE , a pl-sql composite data type can be stored in database

A. TRUE
B. FALSE

Ans A

12. Consider following block

table tab1
t1 t2
10 HCL
20 POLARIS
30 WIPRO

DECLARE
A NUMBER := 40;
B VARCHAR2(16) := 'RBS';
BEGIN
INSERT INTO tab1 VALUES(a,b);
EXECUTE IMMEDIATE "CREATE TABLE tab2(t1 NUMBER, t2 VARCHAR2(30))" ;
ROLLBACK;
EXCEPTION
WHEN others THEN
dbms_output.put_line('Exception in Outer BLOCK');
END;

SELECT * FROM tab1;

A) 10 HCL
20 POLARIS
30 WIPRO

B) 10 HCL
20 POLARIS
30 WIPRO
40 RBS

C) 10 HCL
20 POLARIS
30 WIPRO
NULL NULL

D) None

Ans : B

13. What is PRAGMA pl-sql

A) A type of variable in pl-sql


B) A type executable statement
C) A directive to compiler
D) None of above

Ans : C

14. What is a AUTONOMOUS_TRANSACTION

A) A transaction that starts automatically


B) A transaction that ends automatically
C) A transaction that initiates another transaction automatically
D) None of above

Ans : D

15. CREATE TABLE ........ AS SELECT * FROM emp; will

A) Will create table only


B) WiIl create table and populate it with data from table in SELECT clause
C) Will cause a syntax error, Not permitted in Oracle
D) None of above.
Ans : B

16. What is a tablespace

A) space in any table.


B) Memory consumed by any table
C) A logical structure in which database is divided
D) None of above

Ans : C

17. What's correct about Oracle schema and oracle user

A) There is no difference they are same


B) Oracle shema is a work area and user is a user who own it.
C) An Oracle users all objects resides in the schema own by him/her.
D) All of above

Ans : D

18. What's Materialized View

A) It's a normal view with another name.


B) They are created by oracle explicitily as part of Data Dictionary.
C) These are user defined views with query result stored physically.
D) None of above

Ans : C

19. An oracle cann't connect to oracle untill he/she is given following Role/s

A) Resource
B) Grant
C) Connect
D) All of above

Ans : C

20. What's a max no of columns permitted in an Oracle(11g) table

A) 32
B) 64
C) 256
D) 1000

Ans : D

21. What's a max no of columns permitted in an Oracle(11g) Index

A) 32
B) 64
C) 256
D) 1000
Ans : A

22. What is forall Statement in Oracle pl-sql

A) The FORALL binds input as a collection and sends them to the SQL engine for processing.

B) Runs all statements under a for loop and save the output in pl-sql arrays.

C) It executes mutiple sql statements in one.

D) None of above.

Ans : A

23. How to call a trigger from a stored procedure

A) EXEC trigger_name;

B) EXECUTE IMMEDIATE trigger_name ;

B) Call "trigger_name";

D) Not possible.

Ans : D

24. CREATE SEQUENCE sequenceName ............... CACHE value, What CACHE clause do?

A) Fetces given value in cache when sequence is accessed.

B) Keeps given value in memory every time for future use.

C) Will keep whole sequence in CACHE for better performance.

D) None of above

Ans : A

---------------------------------Unix ----------------------------------------------------------------------

25. What is '-l' used in ls command ?

A) Will do a long listing include ownership, permission, size etc.


B) Will show line number while listing.
C) Will show Latest file first.
D) None of above.

Ans : A

26. What is '|' (pipe) operator

A) It's used to join output of command.


B) It will join two commands, where output of first will be input for second.
C) It will join two scripts.
D) None of above.
Ans : B
27. How to find Exception in log files available in current directory and how to find number of
occurrence?

A) $ grep 'Exception' log1.txt | wc -l

B) $ find 'Exception' log1.txt | wc -l

C) $ more 'Exception' log1.txt | wc -l

D) None of above

Ans : A

28. How to find remaining disk space in unix\linux server?

A) $ ps -ef

B) $ df -kl

C) $ ls

D) None of above

Ans : B

29. How would you use AWK to extract the sixth field from a line of text containing colon (:)
delimited fields that is stored in a variable called passwd_line?

A) echo $passwd_line | awk -Z: '{ print $6 }'


B) echo $passwd_line | awk -X: '{ $6 }'
C) echo $passwd_line | awk -F: '{ print $6 }'
D) None of above

Ans : C

30. What does 2>&1 mean?

A) The 2>&1 is typically used when running a command with its standard output redirected to a file.

B) Will terminate the loop and come out.

C) Will terminate the existing command and come out.

D) None of above.

Ans : A

You might also like