original_docstring: 
          Given a cursor object that has just performed an INSERT statement into
          a table that has an auto-incrementing ID, returns the newly created ID.
  
          This method also receives the table name and the name of the primary-key
          column.
          
docstring: Given a cursor object that has just performed an INSERT statement into
  a table that has an auto-incrementing ID, returns the newly created ID.
  
  This method also receives the table name and the name of the primary-key
  column.
docstring_tokens: Given a cursor object that has just performed an INSERT statement into a table that has an auto - incrementing ID returns the newly created ID . This method also receives the table name and the name of the primary - key column .
code: def last_insert_id(self, cursor, table_name, pk_name):
          """
          Given a cursor object that has just performed an INSERT statement into
          a table that has an auto-incrementing ID, returns the newly created ID.
  
          This method also receives the table name and the name of the primary-key
          column.
          """
          # TODO: Check how the `last_insert_id` is being used in the upper layers
          #       in context of multithreaded access, compare with other backends
  
          # IDENT_CURRENT:  http://msdn2.microsoft.com/en-us/library/ms175098.aspx
          # SCOPE_IDENTITY: http://msdn2.microsoft.com/en-us/library/ms190315.aspx
          # @@IDENTITY:     http://msdn2.microsoft.com/en-us/library/ms187342.aspx
  
          # IDENT_CURRENT is not limited by scope and session; it is limited to
          # a specified table. IDENT_CURRENT returns the value generated for
          # a specific table in any session and any scope.
          # SCOPE_IDENTITY and @@IDENTITY return the last identity values that
          # are generated in any table in the current session. However,
          # SCOPE_IDENTITY returns values inserted only within the current scope;
          # @@IDENTITY is not limited to a specific scope.
  
          table_name = self.quote_name(table_name)
          cursor.execute("SELECT CAST(IDENT_CURRENT(%s) AS int)", [table_name])
          return cursor.fetchone()[0]
code_tokens: def last_insert_id ( self , cursor , table_name , pk_name ) : table_name = self . quote_name ( table_name ) cursor . execute ( "SELECT CAST(IDENT_CURRENT(%s) AS int)" , [ table_name ] ) return cursor . fetchone ( ) [ 0 ]
short_docstring: Given a cursor object that has just performed an INSERT statement into
  a table that has an auto-incrementing ID, returns the newly created ID.
short_docstring_tokens: Given a cursor object that has just performed an INSERT statement into a table that has an auto - incrementing ID returns the newly created ID .
comment: """
          Given a cursor object that has just performed an INSERT statement into
          a table that has an auto-incrementing ID, returns the newly created ID.
  
          This method also receives the table name and the name of the primary-key
          column.
          """$SEP$# TODO: Check how the `last_insert_id` is being used in the upper layers$SEP$#       in context of multithreaded access, compare with other backends$SEP$# IDENT_CURRENT:  http://msdn2.microsoft.com/en-us/library/ms175098.aspx$SEP$# SCOPE_IDENTITY: http://msdn2.microsoft.com/en-us/library/ms190315.aspx$SEP$# @@IDENTITY:     http://msdn2.microsoft.com/en-us/library/ms187342.aspx$SEP$# IDENT_CURRENT is not limited by scope and session; it is limited to$SEP$# a specified table. IDENT_CURRENT returns the value generated for$SEP$# a specific table in any session and any scope.$SEP$# SCOPE_IDENTITY and @@IDENTITY return the last identity values that$SEP$# are generated in any table in the current session. However,$SEP$# SCOPE_IDENTITY returns values inserted only within the current scope;$SEP$# @@IDENTITY is not limited to a specific scope.