> For the complete documentation index, see [llms.txt](https://ai2sql.gitbook.io/ai2sql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai2sql.gitbook.io/ai2sql/9.-database-connectors/9.5.-generating-sql-queries-for-connected-databases.md).

# 9.5. Generating SQL queries for connected databases

1. In the AI2SQL Workspace, click the "Connectors" dropdown and select the desired database connection.
2. Type a natural language query related to the data in the connected database.
3. Click the "Generate SQL" button to convert your query into an SQL query tailored to the selected database connection.

<figure><img src="https://3005060795-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9oPPpXcfNXETmlVmVUd%2Fuploads%2FiuMcyYEtkCs8X36OFQZC%2FScreen%20Shot%202023-05-01%20at%2010.30.12%20PM.png?alt=media&amp;token=be2219c7-4043-4c6f-9b5b-8e1a93a4f210" alt=""><figcaption></figcaption></figure>
