Read_sql() vs read_sql_query()?

What is the difference between read_sql() and read_sql_query()?

1 Like

Hi @ajtam555,

read_sql() is a function created for convenience that may call read_sql_query() or read_sql_table() depending on the input we provide.

This function is a convenience wrapper around read_sql_table and read_sql_query (for backward compatibility). It will delegate to the specific function depending on the provided input. A SQL query will be routed to read_sql_query , while a database table name will be routed to read_sql_table . Note that the delegated function might have more specific notes about their functionality not listed here.
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_sql.html

Best,
Sahil