PL/SQL SqlCode

Oracle PL/SQL SqlCode Example

DECLARE
	var customers%rowtype;
BEGIN
	Select * 
	Into var 
	From customers c
	Where c.customer_type='I';
	dbms_output.put_line('ID: ' || var.customer_id);
	dbms_output.put_line('NAME: ' || var.customer_name);
EXCEPTION
	WHEN Others THEN
	dbms_output.put_line('Sqlcode exception is:'||sqlcode);
	Raise;
END;