![pl sql developer interview question pl sql developer interview question](https://www.softwaretestinghelp.com/wp-content/qa/uploads/2016/07/statements-supported-by-SQL.jpg)
It occurs when a trigger tries to update a row that it is currently using. With SAVEPOINT, only part of transaction can be undone.ĩ.What is mutating error?(90% asked PL SQL Interview Questions) It undoes all the work done by the user in a transaction. When transaction become wrong user can rollback the data.ġ.The work done in a transition is undone as if it was never issued.Ģ.All locks acquired by transaction are released. When user commits the data after transaction that changes are permanent changes.ġ.Other users can see the data changes made by the transaction.Ģ.The locks acquired by the transaction are released.ģ.The work done by the transaction becomes permanent. Raise_Application_Error (-20343, ‘The balance is too low.’) Raise_Application_Error(Error_Code,Error_Message) Raise_Application_Error is the system defined procedure of package named DBMS_STANDARD.
![pl sql developer interview question pl sql developer interview question](https://i.pinimg.com/originals/c7/f6/61/c7f66125b64669e5a105fc2aa38fda08.jpg)
When user wants to insert Error message then user needs to use the Raise_Application_Error procedure. Triggers are database objects with specific conditions.Ħ)Implement Complex security authorizations. PL SQL procedure which is used to trigger specific event on specific condition is known as database triggers. In For loop all cursor operations done implicitly.Ħ.What is Database Trigger?What is real use of trigger? It then opens a cursor, gets rows of values from the active set in fields of the record and shuts when all records are processed.Means while using the for loop user dont need to Open the cursor and fetch the values from cursor or close cursor explicitly. Variable1 Emp_Cur %ROWTYPE -This is cursor variable nameĮXIT WHEN Emp_Cur %Notfound -When cursorĭBMS_OUTPUT.PUT_LINE( variable1.Employee_name || ' works in department 'Ĭursor declares %ROWTYPE as loop index implicitly. %ROWTYPE is cursor attribute which is used to define the record of the field.Each field assumes it own datatype and %ROWTYPE is used to define the specific record type.ĬREATE OR REPLACE PROCEDURE P_Employee_InformationĬURSOR Emp_Cur IS SELECT Employee_name, Employee_Number FROM emp Ref cursor is variable not cursor but that variable points to cursor.Ĥ.What is %ROWTYPE ? Explain this with example.
![pl sql developer interview question pl sql developer interview question](https://i.ytimg.com/vi/-8FWKbjTT1E/maxresdefault.jpg)
There are following 4 operations needs to be done by user :Īs the name suggested ref cursor is a variable which will point to the address or reference of the cursor. The above cursor is implicit cursor where all the operations are defined by oracle engine internally like declaring the cursor,fetching values from the cursor and close cursor.Įxplicit Cursor : Explicit cursor is a cursor which is defined by user to process set of records.For multiple records user needs to use explicit cursor.Explicit cursor operations are done by the user. Select ename into V_Ename from Employee where empno=101