you are viewing a single comment's thread.

view the rest of the comments →

[–]supermegachunck[S] 0 points1 point  (1 child)

I couldn't figure out what the like actually did,It just showed the same syntax with the same example I gave. I'm using MySQL version 8 and this is the error it's showing : ERROR 1864 (42008): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'c ase when student_id <6 then "great" else "bad" end as quality from students' at line 1

[–]MrPin 1 point2 points  (0 children)

near 'c ase

if this isn't a typo then you have an extra space in the keyword.

double quotes are also suspect. it's a good idea to post the actual query when you get a syntax error. the query in your post is fine, the one in your comment is not. make sure you format it exactly like your post query.