def result_table_to_string(table):
  """Converts a resulting SQL table to a human-readable string."""
  string_val = '\t' + '\n\t'.join(
      [str(row) for row in table[:min(len(table), 5)]]) + '\n'
  if len(table) > 5:
    string_val += '... and %d more rows.\n' % (len(table) - 5)
  return string_val