AI engineering glossary · SQL databases

What is parameterised query?

Parameterised query (also called Bind variable): A query written with placeholders for values, which are sent to the database separately from the SQL text, so input is always treated as data and never as code. It blocks injection and allows plan reuse.

Level: intermediateTopic: SQL databases

Parameterised query: an example

cursor.execute('SELECT * FROM users WHERE email = %s', (email,)) keeps user input out of the SQL string.

Related terms

More SQL databases terms

Where you learn it

Parameterised query is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.