Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 246 Bytes

mysql-common-function.md

File metadata and controls

12 lines (8 loc) · 246 Bytes

mysql常用函数

查询自增长字段insert之后的值

LAST_INSERT_ID()
返回的是相对于当前connection的,所以不用担心并发问题

insert into tb(...) values(...);
set 新增的值 = LAST_INSERT_ID() ;