不知道怎么了来人帮帮我

时间:2019-07-05 07:45:01

标签: mysql

SELECT
person.CustomerID as CustomerID,
address.Street as Street,

(
SELECT FROM Company comp
WHERE comp.Id = person.ID
AND entry_key = '_custComment' ) comp
,(SELECT FROM company comp
WHERE company.ID = person.ID
AND entry_key = '_otherInfo') other
Address addr, 
Person person
WHERE person.cid = custbasicinfo.cid
AND person.cid = addr.cid

1 个答案:

答案 0 :(得分:0)

语法上 correcter ,可能是垃圾。.

SELECT
person.CustomerID as CustomerID,
address.Street as Street,
(SELECT a FROM Company comp WHERE comp.Id = person.ID AND entry_key = '_custComment' ) comp,
(SELECT a FROM company comp WHERE company.ID = person.ID AND entry_key = '_otherInfo') other
from Address addr, Person person
WHERE person.cid = custbasicinfo.cid AND person.cid = addr.cid