Using the SELECT Statement Assignment Help

Assignment Help: >> Datatypes - Using the SELECT Statement

Using the SELECT Statement inside PL/SQL:

As discussed previous, PL/SQL permits embedding of one or more SQL statements inside the block. To show a condition based record the select statement needs an 'INTO' clause. A SELECT statement must contain an INTO clause where the output of the query is assigned to the variable provided in the INTO Clause. The subsequent example described this:

Example

DECLARE

s NUMBER;

BEGIN

SELECT sal INTO s FROM emp WHERE empno=7369; DBMS_OUTPUT.PUT_LINE ('the salary is '||s);

END;

The s variable is assigned the salary of the employee number 7369 and the result would be displayed.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd