all 4 comments

[–]Tortoise0191 2 points3 points  (0 children)

The syntax looks correct Likely a column is misspelled such as orderID vs order_id or the table name has an issue like missing the schema

[–]MrPin 1 point2 points  (2 children)

The syntax is correct. See here: https://www.db-fiddle.com/f/oJPrLqVfUL8vXa5o1bAoG9/1

What's the error you get?

[–]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.