PCS Infotech Placement: Sample Questions 19 - 21 of 25

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 19




Can a cursor be closed two times?




Define Close Cursor

Close Command

  • Closes an open cursor by releasing the current result set cursor lock held on the rows.
  • Data structures available for reopening, fetching and positing not available until cursor is reopened.
  • After closing explicit cursor, we can reopen it with the OPEN statement.
  • Closing a closed cursor would throw and error. Syntax of close cursor:
  • CLOSE CURSOR@dbcur

Question 20




A overloaded function can differ by ________



Overloaded function can differ in:

  • Arguments- when query is executed, the server will determine function based on the data types.
  • Simulate functions with a variable number of arguments up to finite maximum number.

Question 21


Write in Short

Short Answer▾

In a PL/SQL block a variable and a table name both are same then which will get highest precedence.


  • In a PL/SQL block, a variable and a table name with same name results in error because PL/SQL checks the database first for a column in the table.
  • The name of variable takes higher precedence over the name of database table.
  • The name of database table column takes precedence over the names of variable.
  • In a PL/SQL block two variables can have the same name, provide they are in different block.

Rules for Variable Names

  • The name of variable should not be longer than 30 characters.
  • The first character must be a letter, the remaining characters are letters, numbers or special symbols.
  • Pl/SQL supports declaring the variable to store intermediate results of query for later use.
  • Variables can be uses anywhere in the same PL/SQL block.

Developed by: