简体   繁体   English

为什么这个查询会在 Python 中抛出这个错误?

[英]Why does this query throw this error in Python?

Code(in Python):代码(在 Python 中):

cur.execute("SELECT * FROM ALL_BOOKS WHERE SUBJECT=\'BIO\';")

Error:错误:

ORA-00933: SQL command not properly ended

Remove ;删除; from the query and try:从查询中尝试:

cur.execute("SELECT * FROM ALL_BOOKS WHERE SUBJECT='\BIO\'")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么这个return语句在这个python递归函数中抛出一个错误? - Why does this return statement throw an error in this python recursive function? 为什么Python中的Wikipedia API调用会引发类型错误? - Why does the Wikipedia API Call in Python throw up a Type Error? 为什么这段代码会抛出错误 - “Python停止工作”? - Why does this code throw an error - “Python stopped working”? 为什么Python Requests在尝试与Tumblr一起使用时会抛出此错误? - Why does Python Requests throw this error when attempting to use it with Tumblr? Python:为什么将int与字符串进行比较的等式不会引发错误? - Python: Why does equality comparing an int with a string not throw an error? 为什么Python Request中的文件上传会抛出400错误 - Why does file upload in Python Request throw 400 Error Python:为什么单元测试assertEqual在这些列表上抛出错误而不是失败? - Python: Why does unittest assertEqual throw an error instead of failure on these lists? 为什么Python在找不到子字符串时会抛出错误? - Why does Python throw an error when a substring is not found? 为什么这个有效的shell命令通过子进程在python中抛出错误? - Why does this valid shell command throw an error in python via subprocess? 已解决:为什么导入 Python 库会引发语法错误? - SOLVED: Why does importing a Python library throw a syntax error?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM