Conversion Function (CAST)
In Oracle/PLSQL, the cast function converts one datatype to another.
The syntax for the cast function is:
cast ( { expr | ( subquery ) | MULTISET ( subquery ) } AS type_name )
For example:
SELECT CAST ( '22-AUG-2003' AS VARCHAR2(30) ) FROM DUAL;
This would convert the date (i.e.: 22-Aug-2003) into a varchar2(30) value.
The syntax for the cast function is:
cast ( { expr | ( subquery ) | MULTISET ( subquery ) } AS type_name )
For example:
SELECT CAST ( '22-AUG-2003' AS VARCHAR2(30) ) FROM DUAL;
This would convert the date (i.e.: 22-Aug-2003) into a varchar2(30) value.
3 Comments:
At 2:50 PM, Noorul Islam said…
hey you mispelled my name :(
its Noorul Islam
one extra a in your case
At 4:09 PM, Archana Raghupathy said…
wil correct it.. :)
At 4:16 PM, Archana Raghupathy said…
corrected it now! :)
Post a Comment
<< Home