Collecting the auto generated column value of just inserted record
If we are using one identity column to generate auto increment numbers, then we can get the recently added number of the record just inserted by using IDENT_CURRENT function. This function will collect the auto generated number of MSSQL and display it to the visitors.