我正在使用 PyCharm,但此 SQL 语句出现错误:
SELECT * FROM table WHERE id= %(id)s
代码语法检查说:
<expression> expected, got '%'
有没有办法禁用此错误消息?换句话说,如何让 PyCharm 识别 SQL 语句中的占位符?
编辑
这是我的解决方案:
For %(id)s
and %s
you have to have %\((\w+)\)s
and %s
in Settings/Preferences | Tools | Database | User parameters
and selectAll languages
不仅是 SQL