# QuerySQLCheckerTool

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/tools/sql_database/tool/QuerySQLCheckerTool)

Use an LLM to check if a query is correct.
Adapted from https://www.patterns.app/blog/2023/01/18/crunchbot-sql-analyst-gpt/

## Signature

```python
QuerySQLCheckerTool()
```

## Extends

- `BaseSQLDatabaseTool`
- `BaseTool`

## Properties

- `template`
- `llm`
- `llm_chain`
- `name`
- `description`
- `args_schema`

## Methods

- [`initialize_llm_chain()`](https://reference.langchain.com/python/langchain-community/tools/sql_database/tool/QuerySQLCheckerTool/initialize_llm_chain)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/tools/sql_database/tool.py#L127)