在我的查询中:
SELECT * FROM ecoprosys.dataset where name="1'-Hydroxyestragole";
我的查询不起作用,因为它与其中已有逗号的 my 字符串混淆。
最佳答案
您需要escape the single quote
目前in your string literal
。尝试下面的查询:
SELECT * FROM ecoprosys.dataset where name='1''-Hydroxyestragole';
关于python - SQL查询错误字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45162937/