I just want to return 1 row with three columns
(SELECT count(1) from tests) TestCount,
(select count(1) from customers) CustomerCount,
(select count(1) from patients) PatientCount
请试试:
select
(SELECT count(1) from tests) TestCount,
(select count(1) from customers) CustomerCount,
(select count(1) from patients) PatientCount
from dual;
SELECT TestCount.TestCount,
CustomerCount.CustomerCount,
PatientCount.PatientCount
FROM (SELECT count(1) TestCount from tests) TestCount
CROSS JOIN
(select count(1) CustomerCount from customers) CustomerCount
CROSS JOIN
(select count(1) PatientCount from patients) PatientCount