1. How can you convert a number into words using Oracle Sql Query?
Please see the query below:-
SELECT TO_CHAR (TO_DATE (523, 'j'), 'jsp') from dual
Output:
TO_CHAR(TO_DATE(523,'J'),
-------------------------
five hundred twenty-three
2. Write a pl sql block that count the department wise total salary where more than 5 employees are exists.
SELECT department_id, count(*),sum(salary) As totalsal
FROM employees
GROUP BY department_id
HAVING COUNT(employee_id) >5
Given below is the output you get
DEPARTMENT_ID COUNT(*) TOTALSAL
------------- ---------- ----------
100 6 51600
30 6 24900
50 45 156400
80 34 304500
0 comments:
Post a Comment
Thank you for your comments we will get back to soon