Using mysql function in code

1 次查看(过去 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