PL/SQL: Variables, Constants, and Literals Cheat Sheet

Variables
Variable_name  datatype(size);
Constants
Constant_Name  constant  Datatype(size) := value;
Literals
Literal TypeExample
Numeric Literals050 78 -14 0 +327676.6667 0.0 -12.0 3.14159 +7800.006E5 1.0E-8 3.14159e0 -1E38 -9.5e-3
Character Literals‘A’ ‘%’ ‘9’ ‘ ‘ ‘z’ ‘(‘
String Literals‘Hello, world!”Tutorials Point”19-NOV-12’
BOOLEAN LiteralsTRUE, FALSE, and NULL.
Date and Time LiteralsDATE ‘1978-12-25’;TIMESTAMP ‘2012-10-29 12:01:01’;

Leave a Reply

Your email address will not be published. Required fields are marked *