在這個SQL我只是想檢查在」ON「子句b.block ='False'.Because有時」profileview「表值是空的 我只是想,如果user_fullinfo值profileview與此條件b.block =「假」應該是顯示相匹配時,如果值不存在於輪廓圖也然後它應該顯示,SQL錯誤說「不正確的語法」=「
SELECT a.* FROM user_fullinfo a left join profileview b on
CASE
WHEN a.id=b.rid and b.rid='105' THEN
b.block='False'
END
where gender != 'Male' and (DATEDIFF(YY,dob,GETDATE()) Between '10' and '100') and (a.heightid between 58 and 65) and(a.complexionid = '3' or a.complexionid = '4' or a.complexionid = '5') and a.bodytypeid = '4' and a.marital_statusid = '3'
它說SQL錯誤(102):不正確語法靠近「=」.. 請給解決辦法..
爲什麼'mysql'標記在這裏? –
聲明是mysql-syntax,無法識別我的sql服務器 – Psi
連接條件在哪裏? –