SQLDatabase.get_table_info is not returning useful information
Labels: name: area: doc loader, name: auto:bug

### System Info

Python 3.11.5
langchain 0.0.343 
langchain-core 0.0.7
sqlalchemy 2.0.21


### Who can help?

_No response_

### Information

- [X] The official example notebooks/scripts
- [ ] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [X] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

```
# make a little database
import sqlite3
con = sqlite3.connect("test.db")
cur = con.cursor()
cur.execute("DROP TABLE IF EXISTS test_table")
cur.execute("CREATE TABLE test_table(a, b, c, d)")
cur.execute("INSERT INTO test_table VALUES (1,2,3,4)")
cur.execute("INSERT INTO test_table VALUES (4,5,6,7)")
cur.execute("INSERT INTO test_table VALUES (8,9,10,11)")
con.commit()

# then...
from langchain.sql_database import SQLDatabase
db = SQLDatabase.from_uri("sqlite:///test.db", include_tables=["test_table"], sample_rows_in_table_info=2)
print(db.table_info)

---------------------------------------------------------------------------
OperationalError                          Traceback (most recent call last)
File ~/miniconda3/envs/forScience/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1965, in Connection._exec_single_context(self, dialect, context, statement, parameters)
   1964     if not evt_handled:
-> 1965         self.dialect.do_execute(
   1966             cursor, str_statement, effective_parameters, context
   1967         )
   1969 if self._has_events or self.engine._has_events:

File ~/miniconda3/envs/forScience/lib/python3.11/site-packages/sqlalchemy/engine/default.py:921, in DefaultDialect.do_execute(self, cursor, statement, parameters, context)
    920 def do_execute(self, cursor, statement, parameters, context=None):
--> 921     cursor.execute(statement, parameters)

OperationalError: near "FROM": syntax error

The above exception was the direct cause of the following exception:

OperationalError                          Traceback (most recent call last)
Cell In[23], line 3
      1 from langchain.sql_database import SQLDatabase
      2 db = SQLDatabase.from_uri("sqlite:///test.db", include_tables=["test_table"], sample_rows_in_table_info=2)
----> 3 print(db.table_info)

File ~/miniconda3/envs/forScience/lib/python3.11/site-packages/langchain/utilities/sql_database.py:286, in SQLDatabase.table_info(self)
    283 @property
    284 def table_info(self) -> str:
    285     """Information about all tables in the database."""
--> 286     return self.get_table_info()

File ~/miniconda3/envs/forScience/lib/python3.11/site-packages/langchain/utilities/sql_database.py:334, in SQLDatabase.get_table_info(self, table_names)
    332     table_info += f"\n{self._get_table_indexes(table)}\n"
    333 if self._sample_rows_in_table_info:
--> 334     table_info += f"\n{self._get_sample_rows(table)}\n"
    335 if has_extra_info:
    336     table_info += "*/"

File ~/miniconda3/envs/forScience/lib/python3.11/site-packages/langchain/utilities/sql_database.py:357, in SQLDatabase._get_sample_rows(self, table)
    354 try:
    355     # get the sample rows
    356     with self._engine.connect() as connection:
--> 357         sample_rows_result = connection.execute(command)  # type: ignore
    358         # shorten values in the sample rows
    359         sample_rows = list(
    360             map(lambda ls: [str(i)[:100] for i in ls], sample_rows_result)
    361         )

File ~/miniconda3/envs/forScience/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1412, in Connection.execute(self, statement, parameters, execution_options)
   1410     raise exc.ObjectNotExecutableError(statement) from err
   1411 else:
-> 1412     return meth(
   1413         self,
   1414         distilled_parameters,
   1415         execution_options or NO_OPTIONS,
   1416     )

File ~/miniconda3/envs/forScience/lib/python3.11/site-packages/sqlalchemy/sql/elements.py:516, in ClauseElement._execute_on_connection(self, connection, distilled_params, execution_options)
    514     if TYPE_CHECKING:
    515         assert isinstance(self, Executable)
--> 516     return connection._execute_clauseelement(
    517         self, distilled_params, execution_options
    518     )
    519 else:
    520     raise exc.ObjectNotExecutableError(self)

File ~/miniconda3/envs/forScience/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1635, in Connection._execute_clauseelement(self, elem, distilled_parameters, execution_options)
   1623 compiled_cache: Optional[CompiledCacheType] = execution_options.get(
   1624     "compiled_cache", self.engine._compiled_cache
   1625 )
   1627 compiled_sql, extracted_params, cache_hit = elem._compile_w_cache(
   1628     dialect=dialect,
   1629     compiled_cache=compiled_cache,
   (...)
   1633     linting=self.dialect.compiler_linting | compiler.WARN_LINTING,
   1634 )
-> 1635 ret = self._execute_context(
   1636     dialect,
   1637     dialect.execution_ctx_cls._init_compiled,
   1638     compiled_sql,
   1639     distilled_parameters,
   1640     execution_options,
   1641     compiled_sql,
   1642     distilled_parameters,
   1643     elem,
   1644     extracted_params,
   1645     cache_hit=cache_hit,
   1646 )
   1647 if has_events:
   1648     self.dispatch.after_execute(
   1649         self,
   1650         elem,
   (...)
   1654         ret,
   1655     )

File ~/miniconda3/envs/forScience/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1844, in Connection._execute_context(self, dialect, constructor, statement, parameters, execution_options, *args, **kw)
   1839     return self._exec_insertmany_context(
   1840         dialect,
   1841         context,
   1842     )
   1843 else:
-> 1844     return self._exec_single_context(
   1845         dialect, context, statement, parameters
   1846     )

File ~/miniconda3/envs/forScience/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1984, in Connection._exec_single_context(self, dialect, context, statement, parameters)
   1981     result = context._setup_result_proxy()
   1983 except BaseException as e:
-> 1984     self._handle_dbapi_exception(
   1985         e, str_statement, effective_parameters, cursor, context
   1986     )
   1988 return result

File ~/miniconda3/envs/forScience/lib/python3.11/site-packages/sqlalchemy/engine/base.py:2339, in Connection._handle_dbapi_exception(self, e, statement, parameters, cursor, context, is_sub_exec)
   2337 elif should_wrap:
   2338     assert sqlalchemy_exception is not None
-> 2339     raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
   2340 else:
   2341     assert exc_info[1] is not None

File ~/miniconda3/envs/forScience/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1965, in Connection._exec_single_context(self, dialect, context, statement, parameters)
   1963                 break
   1964     if not evt_handled:
-> 1965         self.dialect.do_execute(
   1966             cursor, str_statement, effective_parameters, context
   1967         )
   1969 if self._has_events or self.engine._has_events:
   1970     self.dispatch.after_cursor_execute(
   1971         self,
   1972         cursor,
   (...)
   1976         context.executemany,
   1977     )

File ~/miniconda3/envs/forScience/lib/python3.11/site-packages/sqlalchemy/engine/default.py:921, in DefaultDialect.do_execute(self, cursor, statement, parameters, context)
    920 def do_execute(self, cursor, statement, parameters, context=None):
--> 921     cursor.execute(statement, parameters)

OperationalError: (sqlite3.OperationalError) near "FROM": syntax error
[SQL: SELECT 
FROM test_table
 LIMIT ? OFFSET ?]
[parameters: (2, 0)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
```

### Expected behavior

From https://python.langchain.com/docs/use_cases/qa_structured/sql I expect:
```
    CREATE TABLE "test_table" (
        "a" INTEGER, 
        "b" INTEGER, 
        "c" INTEGER, 
        "d" INTEGER 
    )
    
    /*
    2 rows from test_table table:
    a b c d
    1 2 3 4
    5 6 7 8
    */
```