哪些职业不是学生,律师或教育工作者?按字母顺序降序列出它们?
SELECT Occupation
FROM Viewer
WHERE occupation NOT IN 'student,lawyer,educator'
ORDER BY occupation desc;
我一直收到错误。我做错了什么?
答案 0 :(得分:6)
IN
需要括号括起来的表达式列表:
SELECT Occupation
FROM Viewer
WHERE occupation NOT IN ('student','lawyer','educator')
ORDER BY occupation desc;
请参阅documentation for IN
以查看正确的语法: