1
I need to create a view in Mysql where return the following result.
Col1 | Col2
Total Tab1 | Total Tab2
I am using UNION in the form below, but the result comes as follows:
col1
201
5699
CREATE VIEW `dashboards` AS (
select
count(`clientes`.`id`) AS `col1`
from
`clientes`) union all (
select
count(`titulos`.`id`) AS `col2`
from
`titulos`);
But I need it to return as columns and not as lines.
Someone can help me?
Perfect, just needed to turn into view, @Shura16.
– Ivan Ferrer