ITKeyword,专注技术干货聚合推荐

注册 | 登录

Memcache(MC)系列(七)Memcache stats命令

xifeijian 分享于 2015-06-16

up vote -1 down vote favorite

I have written the below code but it is not working it is telling ORA-01008: not all variables bound. cur.execute("update python set id = :10 where id = :1")

python oracle python-2.7 python-3.x cx-oracle share | improve this question edited Apr 3 '16 at 16:52 Oz123 9,986 12 52 104 asked Apr 3 '16 at 16:46 Ashok 3 6      from the type of error I am guessing you are using Oracle, you should however add more info –  Oz123 Apr 3 '16 at 16:53 1   The stuff starting with : are placeholders for values that are substituted in place. Try cur.execute("update python set id = 10 where id = 1"). –  Antti Haapala Apr 3 '16 at 17:01 add a comment  | 

1 Answer 1

active oldest votes up vote 0 down vote accepted

When Oracle interpreter see colons, it expects to use bound variables, which will be provided separately.

In your case you should remove colons:

update python set id = 10 where id = 1

share | improve this answer answered Apr 4 '16 at 11:42 Pavel Zimogorov 1,049 3 19 add a comment  | 

Your Answer

  draft saved draft discarded

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Email and Password

Post as a guest

Name Email

Post as a guest

Name Email discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged python oracle python-2.7 python-3.x cx-oracle or ask your own question.

up vote -1 down vote favorite I have written the below code but it is not working it is telling ORA-01008: not all variables bound. cur.execute("update python set id = :10 where id

相关阅读排行


用户评论

游客

相关内容推荐

最新文章

×

×

请激活账号

为了能正常使用评论、编辑功能及以后陆续为用户提供的其他产品,请激活账号。

您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱

如果您没有收到激活邮件,请注意检查垃圾箱。