code: def execute_scalar(self, query_string, params=None):
          
          self.execute(query_string, params)
          row = self.fetchone()
          if not row:
              return None
          return row[0]
docs: This method sends a query to the MS SQL Server to which this object
          instance is connected, then returns first column of first row from
          result. An exception is raised on failure. If there are pending
  
          results or rows prior to executing this command, they are silently
          discarded.
  
          This method accepts Python formatting. Please see execute_query()
          for details.
  
          This method is useful if you want just a single value, as in:
  
              ``conn.execute_scalar('SELECT COUNT(*) FROM employees')``
  
          This method works in the same way as ``iter(conn).next()[0]``.
          Remaining rows, if any, can still be iterated after calling this
          method.