SELECT
dept.deptname,details.UserName,
(select CONCAT(BrndName,' - ',ModName,' - ',Capacity) from details where Devname='PROCESSOR' ) as Processor,
(select CONCAT(BrndName,' - ',ModName,' - ',Capacity) from details where Devname='PROCESSOR' ) as Memory
FROM
dept
LEFT JOIN details ON dept.deptcode = details.DeptCode
答案 0 :(得分:1)
您似乎在尝试在子查询中选择3列 - 然后尝试将它们表示为单列。
如果我没记错的话,你不能将三列(例如'BrndName,Modname,Capacity')放入一列(例如'crevrtv')而不先连接它们,所以MySQL会告诉你这个事实。
您还尝试使用别名'crevrtv'返回两列。