If you have multiple inserts in one statement, last_insert_id will show you the value of the first inserted row for that session. Else it will show you the last value inserted by that session.
@@IDENTITY is a synonym for last_insert_id in version 3.23.25.
Function is for Visual Basic compatibility
"If you always do what you've always done, you will always be where you've always been."