Tuesday, 22 May 2012

Can a variable be assigned a value from database? If yes, then how? | PL SQL

Yes, a variable can be assigned a value from a database. You can fetch the value from the database and assign it to the variable using the into keyword, as shown in the following code:
 select emp_sal * 0.20 into var_increment from t_employee where emp_no = emp_id

No comments: