본문 바로가기

Database/PLSQL

039 - [Oracle PL/SQL] Functions

<샘플코드에서 사용한 데이터는 HR 스키마이고, 오라클 설치시 생성할 수 있는 기본 스키마 입니다>

 

 

 

 

 

Examples :

we can crate function to return the salary for an employee

Function to retrieve the full name for the employee

Function to calculate the GPA for the Student

Function to compute the tax for a salary

 

 

 

 

 

Host variables not allowed, also substitute variables

It should be at least one return expression in executable section

Return datatype should be without size.

Out / IN OUT can be used , but this not good Practice

 

 

 

A Procedure that have one Parameter( OUT) would be better rewritten as A function