title: I need to get the second last row in a table in database
body: <p>I have this code to print the values of columns of the last row but I need to check the second last row. I tried a lot of methods with (fetchall(),...etc) but i didn't get the target result
  Can anyone help me to get the second last row in a table that i don't know the number of its lines?
  Thank you in advance.</p>
  <pre><code>    colnames = [desc[0] for desc in self.cursor.description]
      coltypes = [desc[1] for desc in self.cursor.description]
      columns_nb= len(colnames)
      result = self.cursor.fetchone()
      self.close_database_connection()
      if result:
          for i in range(columns_nb):
              colname = colnames[i]
              coltype = coltypes[i]
              rows_value = result[i]
              rows_values.append(rows_value)
              row_data_dict[column_name] = [ rows_value, coltype ]
              self.logger.debug(&quot;Column {} values : {}&quot;\
                                .format(colname , result[i]))
  </code></pre>