比如这种查询,uid 字段是 int 类型的,但是在 pymysql 的原生查询方式里,用%s 占位符,%d 占位符,int 类型,数字字符串查询: sp.execute_cmd('select * from table where uid = %s', 12) sp.execute_cmd('select * from table where uid = %s', '12') sp.execute_cmd('select * from table where uid = %d', 12) 测试了一下都能查询到,问题有如下: 1.第一二种这种查询是不是就会触发数据库的类型隐式转换 2.想了解一下占位符需不需要根据查询字段的类型去更换呢