The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments. Please have a happy and safe festive season and as always, thanks for being a member of the AskTOM community.
Thanks for the question.
Asked: November 03, 2016 - 9:44 am UTC
Last updated: May 25, 2022 - 3:46 am UTC
Version: 11g
Viewed 10K+ times! This question is
select (select count(*) c from hr.departments) dept, (select count(*) c from hr.employees) emps from dual; DEPT EMPS 27 107
with counts as ( select 'D' tab, count(*) c from hr.departments union all select 'E' tab, count(*) c from hr.employees ) select * from counts pivot (min(c) for tab in ('D' as dept, 'E' as emps)); DEPT EMPS 27 107
A reader, May 24, 2022 - 3:50 pm UTC
Share and learn SQL and PL/SQL; free access to the latest version of Oracle Database!
Classes, workouts and quizzes on Oracle Database technologies. Expertise through exercise!