Database values-assignments in pl/sql, PL-SQL Programming

Database Values

You can use the SELECT statement to have the Oracle assign values to a variable. For
Each and every item in the select list, there must be a matching, type-compatible variable in the INTO list. An illustration is as shown below:

DECLARE
my_empno emp.empno%TYPE;
my_ename emp.ename%TYPE;
wages NUMBER(7,2);
BEGIN
...
SELECT ename, sal + comm
INTO last_name, wages FROM emp
WHERE empno = emp_id;

Though, you cannot select column values into the Boolean variable.

Posted Date: 10/3/2012 5:08:03 AM | Location : United States







Related Discussions:- Database values-assignments in pl/sql, Assignment Help, Ask Question on Database values-assignments in pl/sql, Get Answer, Expert's Help, Database values-assignments in pl/sql Discussions

Write discussion on Database values-assignments in pl/sql
Your posts are moderated
Related Questions
EXCEPTION_INIT Pragma The pragma EXCEPTION_INIT relates an exception name with an Oracle error number. Which allow you to refer to any internal exception by the name and to wri

Anatomy of a Command Figure, showing a simple SQL command, is almost identical to its counterpart in the theory book. The only difference arises from the fact that SQL uses a

Use Serially Reusable Packages To help you to manage the use of memory, the PL/SQL gives the pragma SERIALLY_ REUSABLE that mark some packages as serially reusable . So mark

Iteration Schemes The bounds of a loop range can be variables, literals, variables, or expressions but must compute to integers. Below are some of the examples. As you can see t

How Exceptions Propagate ? Whenever an exception is raised, and if the PL/SQL cannot find a handler for it in the present subprogram or block, the exception propagates. That is

Data Types and Representations This explains the concept possible representation, abbreviated possrep, and explains how these can be used in conjunction with constraints to de

Explicit Cursor Attributes The cursor variable or each cursor has four attributes: %FOUND, %ISOPEN, %ROWCOUNT, and %NOTFOUND. When appended to the cursor or cursor variable, th

I want to implement heap sort algorithm in pl sql please share the source code for guidance

Cursor Attributes   The Cursors and cursor variables have 4 attributes which give you helpful information about the execution of a data manipulation statement. Syntax:

Components of an Object Type: An object type encapsulates the operations and data. Therefore, you can declare the methods and attributes in an object type specification, but no