Using mysql function in code

조회 수: 2 (최근 30일)
Jeff
Jeff 2014년 3월 10일
편집: Dhanyatha 2014년 7월 2일
Is it possible to perform mysql functions like last_auto_increment to determine the last value for the auto increment column in a table? After inserting a new row I have to perform a lookup of the new row to get it's id. Would certainly be nice to grab this without the extra steps?

답변 (1개)

Dhanyatha
Dhanyatha 2014년 7월 2일
편집: Dhanyatha 2014년 7월 2일
You can refer to the workaround mentioned here to retrieve the last generated auto_increment field. This should help you to look up the newly inserted row.

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by