我只想返回包含三列的1行
(SELECT count(1) from tests) TestCount,
(select count(1) from customers) CustomerCount,
(select count(1) from patients) PatientCount
答案 0 :(得分:5)
请尝试:
select
(SELECT count(1) from tests) TestCount,
(select count(1) from customers) CustomerCount,
(select count(1) from patients) PatientCount
from dual;
答案 1 :(得分:0)
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