我有MySql数据库的这种语法,它输出正确的数据。如果您可以节省一些时间来帮助我,我可以在很多MySql查询中使用它。
SELECT eh.contract_reference as 'Reference', eh.ClientCode as 'Client Code', cm.name as 'Name', eh.ChassisNo as 'Chassis No.', eh.ChassisType as 'Chassis Type', con.effective_date as 'Effectivity', con.expiry_date as 'Valid Until', con.Status as 'Status'
FROM delwater_rockyonline.eirheader as eh
JOIN delwater_MasterDB.client_mstr as cm
ON eh.ClientCode = cm.code
JOIN delwater_masterdb.contract_mstr as con
ON eh.contract_reference = con.reference
WHERE con.Status= 'DRAFT'
它给我一个像这样的结果:
非常感谢所有帮助。