«Back to Home

Oracle Jump Start

Topics

How To Use Literals in OraclePLSQL

Literals

Description

There are three types of literals, which are-
  • Text Literals
  • Integer Literals and Number Literals
  • Date/Time Literals
Text Literals

Text literals are written in single quotes.
 
Example
  1. ‘Methew Anderson’  
  2. ’05-sep-92’   
1

Integer Literals and Number Literals

Integer literals are often either positive or negative number. If you are not specify a proof, the positive variety is assumed. Integer literals may be up to 38 digits.

Example
  1. 23 23e-5  
  2. -32 23.50  
  3. +30  
2

Date and Time Literals

Date and Time literals are written in single quotes (‘).

Example
  1. ‘2016/07/06’  
3 

Summary
Thus, we learnt, there are three types of literals such as text literals, integer literals and number literals, date/time literals. We learnt, how to use these literals in Oracle with the examples.