---
title: "How do you find out which auto increment was assigned on the last insert?"  
description: "How do you find out which auto increment was assigned on the last insert?"  
author: "Anonymous User"  
published: 2012-04-09  
updated: 2020-09-24  
canonical: https://www.mindstick.com/interview/1427/how-do-you-find-out-which-auto-increment-was-assigned-on-the-last-insert  
category: "mysql"  
tags: ["mysql"]  
reading_time: 1 minute  

---

# How do you find out which auto increment was assigned on the last insert?

SELECT LAST_INSERT_ID() will return the last value assigned by the auto_increment function. Note that you don’t have to specify the table name.

## Answers

### Answer by Anonymous User

SELECT LAST_INSERT_ID() will return the last value assigned by the auto_increment function. Note that you don’t have to specify the table name.


---

Original Source: https://www.mindstick.com/interview/1427/how-do-you-find-out-which-auto-increment-was-assigned-on-the-last-insert

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
