1
嘿我不能得到這個case語句的工作,會有人介意告訴什麼是錯誤的語法是。MySQL 5.5案例不正確的語法
SELECT standards.standard_id, standards.title, standards.level,standards.credits, SUM(standards.credits), standards.assessment
CASE WHEN standards.assessment = 1 THEN 'External' ELSE 'Internal' END CASE
FROM standards JOIN courses_standards ON standards.standard_id = courses_standards.standard_id
WHERE courses_standards.course_id = 1
確切的錯誤是:
1064 - 你在你的SQL語法錯誤; 'CASE WHEN standards.assessment = 1 THEN'External'ELSE'內部的'END CASE FR'在第3行
這些都是基本的錯誤之間的逗號。你錯過了一個逗號,例子是一個保留字,沒有分組依據 – Strawberry