NL2SQL
NL2SQL is the task of automatically translating a natural language question into an executable SQL query.
In Depth
NL2SQL (natural language to SQL) is the technical name—common in AI research—for converting plain-English questions into SQL. It is the same problem as text-to-SQL: given a question like "which customers spent the most last quarter?" and a database schema, produce a correct query. The hard parts are mapping everyday words to actual table and column names, inferring the right joins, and handling ambiguity. NL2SQL matters because it removes the single biggest barrier between business people and their data: knowing SQL. Modern systems built on large language models reach accuracy levels that make this practical for everyday business questions, not just demos.
How AI for Database Helps
AI for Database is an NL2SQL system end to end: you type a question, it generates the SQL, runs it against your connected database, and returns a table or chart.
Related Terms
Text-to-SQL
The process of converting natural language questions into structured SQL queries that can be executed against a database.
Natural Language Query
A database query expressed in everyday human language rather than a formal query language like SQL.
SQL Generation
SQL generation is the automatic creation of SQL queries by software—typically an AI model—from a user's intent expressed in natural language.
Schema Linking
Schema linking is the step in text-to-SQL where words in a user's question are matched to the specific tables and columns in the database that they refer to.
Ready to try AI for Database?
Query your database in plain English. No SQL required. Start free today.
Free plan available · No credit card required