What is a stored procedure?
A stored procedure is a named set of SQL statements saved in the database and executed as a unit, often with parameters. It packages repeatable logic, such as multi-step updates or business rules, on the server side, so applications can call it by name instead of resending the SQL each time.
Stored procedures live inside the database and run its own procedural language. They bundle logic, several statements, conditionals, loops, into a callable routine.
Teams use them to:
- Encapsulate logic enforce business rules close to the data.
- Reduce round-trips run multi-step work in one server call.
- Reuse call the same routine from many applications.
- Control access let users run a procedure without direct table access.
They are most associated with transactional systems and complex operational workflows rather than ad-hoc analysis.
iDBQuery focuses on the analytical side: answering questions by generating and running SELECT queries against your data, not by writing procedural code into your database. It reads and queries the data your procedures produce, so any results those routines have computed are available to analyse. This read-oriented approach is also a safety feature, iDBQuery is built to query in place with read-only access where you configure it, so it explores and reports on your data without changing it, and cites every figure back to the exact source row.
Updated 2026-06-22