python3不支持MySQLdb,代替的是import pymysql 连接数据库查表: import pymysqlconn= pymysql.connect( host='xx.xx.xx.xx', port = 3306, user='xxx', passwd='xxx', db ='transit', )cur = conn.cursor()cur.execute("SELECT * FROM xxx")for r in cur.fetchall(): print(r) #c…
mysql: select * from table order by id DESC limit 1 oracle: select * from emp where id in (select max(id) from emp); 实例: mysql> use weifeng; Database changed mysql> \G; *************************** . row *************************** bloggerId: likeNum…