gpt4 book ai didi

mysql - 查询 MySQL 数据库

转载 作者:行者123 更新时间:2023-11-30 23:21:52 25 4
gpt4 key购买 nike

谁能帮我在这个包含疾病风险因素的查询中添加第三个表。该表是 tblRiskFactors

SELECT tblDiseases.disease
FROM tblRel
LEFT JOIN tblDiseases ON tblRel.diseaseID = tblDiseases.diseaseID
WHERE tblRel.symptomID = '1' AND tblRel.symptomID = '2' AND tblRel.symptomID ='3'

最佳答案

SELECT  tblDiseases.disease
FROM tblRel
LEFT JOIN tblDiseases
ON tblRel.diseaseID = tblDiseases.diseaseID
LEFT JOIN tblRiskFactors
ON -- define the linking condition here
WHERE tblRel.symptomID = '1' AND
tblRel.symptomID = '2' AND
tblRel.symptomID = '3'

要进一步了解有关联接的更多信息,请访问以下链接:

关于mysql - 查询 MySQL 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15153620/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com