Expressing your work in scientific notation with TO_CHAR() : Data Type Convert « PL SQL « Oracle PL / SQL






Expressing your work in scientific notation with TO_CHAR()


SQL> -- Expressing your work in scientific notation.
SQL> DECLARE
  2        myNumber NUMBER := 90210;
  3        myChar VARCHAR2(21) ;
  4  BEGIN
  5        myChar := TO_CHAR(myNumber,'9.99EEEE');
  6        DBMS_OUTPUT.PUT_LINE('The Scientific Notation is: ' || myChar);
  7  END;
  8  /
The Scientific Notation is:   9.02E+04

PL/SQL procedure successfully completed.

SQL>
           
       








Related examples in the same category

1.Convert char to date: TO_DATE('January 01, 2000','Month DD, YYYY')
2.Convert number to char
3.Converting number to character formatted as a numeric string
4.Convert char to number
5.Converting VARCHAR2 percentage data to a decimal equivalent
6.Convert date to char, and char to date with various formats
7.Convert char to number and number to char with various formats
8.Data implicit conversion examples: from char to number
9.Data implicit conversion examples: from char to date