sql = “insert into t_weather_new(timestamp, content, type)” \
” values (%s,%s,%f) ON DUPLICATE KEY UPDATE ” \
“t_weather_new.content = (%s),t_weather_new.timestamp = (%s)”\
%(repr(timestamp), repr(res_str), 0, repr(res_str), repr(timestamp))
python 中sql写法小例
最新推荐文章于 2024-07-27 12:20:46 发布