Loading
 
What's Next: View All Tutorial →

Variable Usage, Initialization, and Assignment

Variables Syntax: identifier [CONSTANT] datatype [NOT NULL] [:= | DEFAULT expr]; Example: DECLARE   v_date DATE; v_dno NUMBER(2) NOT NULL := 5; v_location VARCHAR2(13) := ‘Berhampur’; c_incenti...

Published Date: 25/08/2014  Last Modified Date: 25/08/2014    New Post



Variables

Syntax:
identifier [CONSTANT] datatype [NOT NULL]   
		[:= | DEFAULT expr];
Example:
DECLARE
  v_date		DATE;		
  v_dno			NUMBER(2) NOT NULL := 5;
  v_location		VARCHAR2(13) := ‘Berhampur’;  
  c_incentive		CONSTANT NUMBER := 100;   
  v_city		VARCHAR2(30) NOT NULL := ‘Mysore’;
  v_mgr			NUMBER(6) DEFAULT 100;
  v_flag 		BOOLEAN := FALSE;

Initialization 

Syntax
identifier := expression;
Examples:
v_joindate := '01-JAN-2004';

v_name := ‘Swetalina';

 
Awaiting for Administrator approval




← Back to list


Related Post




×