from sqlalchemy import text
conn=engine.connect();
s=text("insert into aws_rcsy(topic)values(:topic)");
q_insert=conn.execute(s,topic=topic);
conn.close();
如何取得剛插入資料的id?
ps:q_insert回傳<sqlalchemy.engine.base.ResultProxy object at 0x...>
從q_insert能否取得row資料?
q.lastrowid
複製過來的程式碼,沒有驗證過
參考 stack-overflow