Thursday, December 2, 2010

Oracle PL/SQL Snippets

Just want to post this up @A@;;; it's going to be more complicated tomorrow >w<



 

Random

!! If you plan on using sub-methods, declare it first before the main method

Escaping Single Quote in VARCHAR
use 2 single quotes ''
l_test VARCHAR2(50) := '''pogi ako''';

DBMS_OUTPUT.PUT_LINE(l_test); will result to 'pogi ako' :D

Exiting a Loop
 
1. EXIT WHEN l_loan_amount < 0;
2. EXIT;

can't modify procedure IN variables 
- therefore you need to assign it to a local variable.

No comments:

Post a Comment