Conversion Functions

TO_NUMBER:-  It is used to convert the character value to number datatype.
Syn:-                     TO_NUMBER(‘value’);
Ex:-                       select to_number(‘20’)+to_number(‘30’) from dual;

TO_CHAR:-        It is used to convert the number datatype value to chardatatype                               value.
Syn:-                     TO_CHAR(value);
Ex:-                       select to_char(20)+to_char(30) from dual;
                              Select to_char(sysdate,’month dd,yy’) from dual;
                              Select eno,to_char(mydat,’dd-mm-yy’) from employ4

Select eno,to_char(mydat,’ddth-mon-yy’) from employ4;
                              Select eno,to_char(mydat,’ddsp’) from employ4;
                              Select eno,to_char(mydat,’ddspth’) from employ4;

 

For
Online Classes

Contact Us: +919885348743