【发布时间】:2021-01-30 15:52:21
【问题描述】:
SELECT COUNT(status) AS COUNT
FROM financeinstallment
WHERE status = 1
GROUP BY financeId
UNION
SELECT finance.financeId,
finance.customerId,
customer.customerName,
customer.phone1,
customer.aadhaar,
finance.financeStartDate,
finance.vehicleNumber,
finance.loanAmount,
finance.totalInstallment,
finance.InstallmentAmount
FROM finance
INNER JOIN customer ON customer.customerId = finance.customerId
如何在同一行得到结果?
我收到以下错误:
错误代码:1222。使用的 SELECT 语句具有不同的列数 0.000 秒
【问题讨论】:
-
示例输入数据以及您想要查看的输出将极大地帮助您解决问题。
-
我需要在单行中获取两个选择查询值
标签: mysql inner-join union