A Developer Gateway To IT World...

Techie Uncle Software Testing Core Java Java Spring C Programming Operating System HTML 5 Java 8 ES6 Project

How many ways can we write TO_CHAR Function in oracle 11g ?

ways to write to_char function in oracle 11g

Way to write to_char function in oracle 11g

SELECT employee_id, TO_CHAR(hire_date, 'MM/YY') Month_Hired FROM employees WHERE last_name = 'Higgins';

Here employees table contains columns as employee_id and hire_date. We have implemented to_char() function on hire_date column.

You can also use other format as below:-

SELECT last_name, TO_CHAR(hire_date, 'fmDdspth "of" Month YYYY fmHH:MI:SS AM') HIREDATE FROM employees;

You can also use other format as below:-

SELECT last_name, TO_CHAR(hire_date, 'fmDD Month YYYY') AS HIREDATE FROM employees;

You can also use other format as below:-

SELECT TO_CHAR(salary, '$99,999.00') SALARY FROM employees WHERE last_name = 'Ernst';

LEARN TUTORIALS

.

.