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
What are the rates for help in writing PL/SQL procedures and functions?

OUT Mode An OUT parameter returns values to the caller of a subprogram. Within the subprogram, an OUT parameter act like a variable. That means that you can use an OUT formal

Need Azure CRM Web Application with two-factor authentication We presently have a CRM-like database stored on MS Azure that we presently access over an MS Access application. It

Named Notation The second procedure call uses the named notation. An arrow (=>) serve as the relationship operator that associates the formal parameter to the left of the arro

write the program for traffic control system with 10 second, 15 secod, and 20 second delay

BETWEEN Operator The operator BETWEEN, tests whether the value lies in a specified series. That means "greater than or equivalent to low value and less than or equivalent to hig

Hi,am developing a library system and relating all the table is somehow complex,could you kindly assist me

Wrapping and unwrapping in SQL Operators WRAP and UNWRAP in connection with attributes whose declared types are tuple types. Example shows how extension and projection can be

Use Object Types and Collections The Collection types and object types increase your efficiency by allowing for the realistic data modeling. The Complex real-world entities an

The Package Specification The package specifications contain the public declarations. The scopes of these declarations are local to your database representation and global to t