i have a table having columns such schema name,table name,column name.
schema name | table name | column name |
---|---|---|
dbo | product | colour |
dbo | sales | quantity |
dbo | customer | order |
i want to perform an action such that to get a count of records based on column as column name and table as table name
select count(colour) as count from dbo.product
select count(quantity) as count from dbo.sales
select count(order) as count from dbo.customer
can u suggest me correct steps to achieve this using Oracle database. thanks in advance
expected output
count |
---|
5 |
50 |
150 |