@@IDENTITY and SCOPE_IDENTITY()

 
@@IDENTITY and SCOPE_IDENTITY() will return the last inserted identity value in the current session but in different scenarios they can each return different values.
While both @@IDENTITY and SCOPE_IDENTITY return the last identity value generated in any table in the current session, SCOPE_IDENTITY() will return the value only within the current scope (a [...]

SQL Server TRANSACTION ISOLATION LEVEL

TRANSACTION ISOLATION LEVEL
READ UNCOMMITTED
- can read rows that have been modified by other transactions but not yet committed
- do not issue shared locks to prevent other transactions from modifying data read by the current transaction.
READ COMMITTED
- cannot read data that has been modified but not committed by other transactions. This prevents dirty reads.
- phantom data [...]

ROW_NUMBER (Transact-SQL)

The ROW_NUMBER() function returns the number of a row within a result set starting with 1 for the first row. The ROW_NUMBER() function does not execute until after a WHERE clause is used to select the subset of data.
The following example returns the row number for each contact in AdventureWorks based on the LastName and [...]

SET LANGUAGE

Specifies the language environment for the session. The session language determines the datetime formats and system messages.
SET LANGUAGE implicitly sets the setting of SET DATEFORMAT.
Use
SET LANGUAGE ‘british english’
or
SET LANGUAGE us_english
to specify the language environment for the current session.