Aptitude Test PL/SQL Sample Paper With Answers

Apr 11 • Resources • 37735 Views • 8 Comments on Aptitude Test PL/SQL Sample Paper With Answers

Students preparing for interview must have some basic knowledge regarding PL/SQL as candidate  will surely face some questions from this topic.Here I have provided some basic questions that a candidate must know.Go through this aptitude test PL/SQL sample paper and prepare well.

Aptitude Test  PL/SQL Sample paper with answers 

aptitude test pl/sql sample paper

Aptitude test pl/sql

Section – 1 

1).Each time an SQL statement is executed ,what is made to the engine’s resources.

a].A call                                            
b].A report
c].A bug                                            
d].A trigger sequence

Ans-A).A Call

2).PL/SQL is a what type of language?

a].Object oriented language                
b].Block-Structured
c].Non-Structured                                
d]. Procedural

Ans – B).Block Structured

3).Raw types are used to store which type of data?

a].Number                                          
b].String
c].Binary                                            
d].None of these

Ans – C).Binary

4).The maximum length of long raw column is

a] 3GB                                                
b] 4GB
c] 2GB                                                
d] 1GB

Ans – C)2GB

5).Which function converts the ROWID from extended to restricted .

a].RESTRICTED_TO_EXTENDED          
b].RESTRICTED_ENABLE
c].EXTENDED_TO_RESTRICTED          
d].None of these

Ans – c)EXTENDED_TO_RESTRICTED

6).What is always evaluated to false in case of implicit cursors?

a] SQL%ISOPEN                              
b] SQL%ROWCOUNT
c] SQL%FOUND                              
d] SQL%NOT FOUND

Ans – a)SQL%ISPOPEN

7).What allows passing values dynamically to a cursor while opening a cursor?

a] Implicit Cursors                              
b] Explicit Cursors
c] Parameterized Cursors                
d] None of These

Ans – c)Parameterized Cursors

8).A developer would like to use referential datatype declaration on a variable. The variable name is EMPLOYEE_LASTNAME, and the corresponding table and column is EMPLOYEE, and LNAME, respectively. How would the developer define this variable using referential datatypes?

a].employee.lname%type                    
b].Declare as long.
c] employee.lname%rowtype              
d].Declare as Raw

Ans  – a)employee.lname%type

9).All locks are released on

a] Commit                                        
 b] Unqualified Rollback
c] Rollback                                      
 d] logging

Ans – a) and b).

10).If left out, which of the following would cause an infinite loop to occur in a simple loop?

a] LOOP                                            
b] EXIT
c] NO LOOP                                      
d] IF -THEN

Ans -c)END LOOP

Section -2

Fill in the blanks

1).In a __________ two database operations wait for each other to release a lock.

Ans – Deadlock

2).If user defined error condition exists , the call to the user-defined exception is made  using a ___________ statement.

Ans – RAISE

3).Oracle uses a method called___________to implement concurrency control.

Ans – Locking

4).Oracle verbs used in the SQL statement are compared with the verbs in the oracle _____________and checked for syntax.

Ans – Parse Tree

5).The process of breaking the SQL sentence into words and then checking them for syntax an object privileges is called ______________.

Ans -Parsing

6).A_____________procedure is called after a row has been fetched to transfer the value from the SELECT list of the cursor into local variable .

Ans – COLUMN_VALUE

7).___________trigger executes the trigger action after the triggering statement is executed .

Ans – AFTER

8).Table or Row can be explicitly locked by using either the ___________statement or ____________________ statement .

Ans – SELECT .. FOR UPDATE ,LOCK TABLE

9).If a WHERE clause evaluates to a set of data , a ___________lock is used.

Ans – Page Level

10).________level locks are not released by rolling back to save point.

Ans – Row

Some more questions of Aptitude Test PL/SQL Sample paper :-

11). What does a COMMIT statement do to a CURSOR

a] Open the Cursor
b] Fetch the Cursor
c] Close the Cursor
d] None of the above
Ans : D

12). How can you CALL Reports from Forms4.0 ?

a] Run_Report built_in
b] Call_Report built_in
c] Run_Product built_in
d] Call_Product built_in

Ans : C

13). Which of the following is NOT VALID is PL/SQL

a] Bool boolean;
b] NUM1, NUM2 number;
c] deptname dept.dname%type;
d] date1 date := sysdate
Ans : B

14). Declare
fvar number := null; svar number := 5
Begin
goto << fproc>>
if fvar is null then
<< fproc>>
svar := svar + 5
end if;
End;

What will be the value of svar after the execution ?
a] Error
b] 10
c] 5
d] None of the above

Ans : A
15). Which of the following is TRUE

1] Host variables are declared anywhere in the program
2] Host variables are declared in the DECLARE section
a] Only 1 is TRUE
b] Only 2 is TRUE
c] Both 1 & 2are TRUE
d] Both are FALSE
Ans : B

16). Which of the following is not correct about an Exception ?

a] Raised automatically / Explicitly in response to an ORACLE_ERROR
b] An exception will be raised when an error occurs in that block
c] Process terminates after completion of error sequence.
d] A Procedure or Sequence of statements may be processed.

Ans : C

17). A Stored Procedure is a

a] Sequence of SQL or PL/SQL statements to perform specific function
b] Stored in compiled form in the database
c] Can be called from all client environments
d] All of the above

Ans : D

18). Which of the following statement is false

a] Any procedure can raise an error and return an user message and error number
b] Error number ranging from 20000 to 20999 are reserved for user defined messages
c] Oracle checks Uniqueness of User defined errors
d] Raise_Application_error is used for raising an user defined error.

Ans : C

19). Is it possible to open a cursor which is in a Package in another procedure ?

a] Yes
b] No

Ans : A

20). Is it possible to use Transactional control statements in Database Triggers ?

a] Yes
b] No

Ans : B

21). PL/SQL supports datatype(s)

a] Scalar datatype
b] Composite datatype
c] All of the above
d] None of the above

Ans C
22). Is it possible to Enable or Disable a Database trigger ?

a] Yes
b] No

Ans : A
23). Which of the following is not correct about User_Defined Exceptions ?

a] Must be declared
b] Must be raised explicitly
c] Raised automatically in response to an Oracle error
d] None of the above

Ans : C

23). Find the ODD data type out

a] VARCHAR2
b] RECORD
c] BOOLEAN
d] RAW

Ans : B

24). Which of the following is not correct about the “TABLE” data type ?

a] Can contain any no of columns
b] Simulates a One-dimensional array of unlimited size
c] Column datatype of any Scalar type
d] None of the above

Ans : A

24). Find the ODD one out of the following

a] OPEN
b] CLOSE
c] INSERT
d] FETCH

Ans C

25). Which of the following is NOT VALID in PL/SQL ?

a] Select … into
b] Update
c] Create
d] Delete

Ans : C

26). What is the Result of the following ‘VIK’||NULL||’RAM’ ?

a] Error
b] VIK RAM
c] VIKRAM
d] NULL

Ans : C

27). Declare
a number := 5; b number := null; c number := 10;
Begin
if a > b AND a < c then
a := c * a;
end if;
End;
What will be the value of ‘a’ after execution ?
a] 50
b] NULL
c] 5
d] None of the above

Ans : C
28). Which of the following is not correct about Cursor ?

a] Cursor is a named Private SQL area
b] Cursor holds temporary results
c] Cursor is used for retrieving multiple rows
d] SQL uses implicit Cursors to retrieve rows

Ans : B

29). Does the Database trigger will fire when the table is TRUNCATED ?

a] Yes
b] No

Ans : B

30). SUBSTR(SQUARE ANS ALWAYS WORK HARD,14,6) will return

a] ALWAY
b} S ALWA
c] ALWAYS
Ans : C

31). TRANSLATE(‘333SQD234′,’0123456789ABCDPQRST’,’0123456789′) will return

a] 333234
b] 333333
c] 234333
d] None of the above

Ans : A
31). REPLACE(‘JACK AND JUE’,’J’,’BL’) will return

a] JACK AND BLUE
b] BLACK AND JACK
c] BLACK AND BLUE
d] None of the above

Ans : C

Use these data for the following Questions

32)Select SAL from EMP E1 where 3 > ( Select count(*) from Emp E2
where E1.SAL > E2.SAL ) will retrieve
a] 3500,5000,2500
b] 5000,2850
c] 2850,5750
d] 5000,5750

Ans : A

33). Is it possible to modify a Data type of a column when column contains data ?

a] Yes
b] No

Ans B

34). Which is not part of the Data Definition Language ?

a] CREATE
b] ALTER
c] ALTER SESSION

Ans : C

35) The Data Manipulation Language statements are

a] INSERT
b] UPDATE
c] SELECT
d] All of the above

Ans : D

36). EMPNO ENAME SAL
A822 RAMASWAMY 3500
A812 NARAYAN 5000
A973 UMESH
A500 BALAJI 5750

Using the above data Select count(sal) from Emp will retrieve
a] 1
b] 0
c] 3
d] None of the above

Ans : C
37). Which of the following is not correct about a View ?

a] To protect some of the columns of a table from other users
b] Occupies data storage space
c] To hide complexity of a query
d] To hide complexity of a calculations

Ans : B

38). If an UNIQUE KEY constraint on DATE column is created, will it accept the rows that are inserted with SYSDATE ?

a] Will
b] Won’t

Ans : B

39). Can we pass RECORD GROUP between FORMS ?

a] Yes
b] No

Ans : A

40). SHOW_ALERT function returns

a] Boolean
b] Number
c] Character
d] None of the above

Ans : B
41). What are the different events in Triggers ?

a] Define, Create
b] Drop, Comment
c] Insert, Update, Delete
d] All of the above

Ans : C

42). What built-in subprogram is used to manipulate images in image items ?

a] Zoom_out
b] Zoom_in’
c] Image_zoom
d] Zoom_image

Ans : C

43) :SYSTEM.EFFECTIVE.DATE varaible is

a] Read only
b] Read & Write
c] Write only
d] None of the above

Ans : C

44) When do you get a .PLL extension ?
a] Save Library file
b] Generate Library file
c] Run Library file
d] None of the above

Ans : A
45). What SYSTEM VARIABLE is used to refer DATABASE TIME ?

a] $$dbtime$$
b] $$time$$
c] $$datetime$$
d] None of the above

Ans : A

46). GET_BLOCK property is a

a] Restricted procedure
b] Unrestricted procedure
c] Library function
d] None of the above
47). What is built_in Subprogram ?

a] Stored procedure & Function
b] Collection of Subprogram
c] Collection of Packages
d] None of the above

Ans : D

For more Aptitude Sample Papers click here

Users can give their sugesstion in comment section so as to improve the article.

Tell us Your Queries, Suggestions and Feedback

Your email address will not be published.

8 Responses to Aptitude Test PL/SQL Sample Paper With Answers

  1. Kamal says:
  2. Kamal says:
  3. amitabh tiwari says:

    30). SUBSTR(SQUARE ANS ALWAYS WORK HARD,14,6) will return

    a] ALWAY
    b} S ALWA
    c] ALWAYS
    ANS: C is incorrect:
    SQL> select SUBSTR(‘SQUARE ANS ALWAYS WORK HARD’,14,6) from dual;

    SUBSTR
    ——
    WAYS W

    SQL> select SUBSTR(‘SQUARE ANS ALWAYS WORK HARD’,12,6) from dual;

    SUBSTR
    ——
    ALWAYS

  4. chintu says:

    PURsing BSC, GNIIT

  5. chintu says:

    PURsing BSC, GNIIT

  6. YA5KWNQBVh says:

    136 953940Hmm is anyone else encountering issues with the pictures on this blog loading? Im trying to figure out if its a issue on my end or if its the blog. Any responses would be greatly appreciated. 175784

  7. Srikanth Jadapalli says:

    if we delete the table data in the base table and then it will affected to the virtual table or not ?

  8. ChandraOnlines says:

    For Oracle Apps Technical,Functional,HRMS and SCM training with 100% placement assurance.Contact-9885489062

« »