推荐方式一:cur.execute(“select count(*) from table_name where aaa=:1 and bbb=:2″,(1234,’test’))推荐方式二:cur.execute(“select count(*) from table_name where aaa=:x and bbb=:y”,x=1234,y=’test’)
python execute 语句中 有变量 怎么写
推荐方式一:
cur.execute(“select count(*) from table_name where aaa=:1 and bbb=:2″,(1234,’test’))
推荐方式二:
cur.execute(“select count(*) from table_name where aaa=:x and bbb=:y”,x=1234,y=’test’)2014-07-01