我正在尝试在 SQL 中绑定一个参数:
sql = "SELECT COLUMN_NAME,DATA_TYPE FROM USER_TAB_COLS WHERE TABLE_NAME=UPPER(:TABLENAME)"
print 'TABLENAME=',TABLENAME
sqlqry = sql %(TABLENAME)
但得到字符串格式错误:
TypeError: not all arguments converted during string formatting
可能是什么问题呢?