IT lexicon › Database › Embedded SQL

Embedded SQL

Database På svenska → Updated: 2026-11-11

SQL statements written directly into a host program (C, COBOL, Fortran) and processed by a preprocessor before compilation.

Before modern database APIs or object-relational mappers, programmers used embedded SQL (often called "Pro*C" in Oracle). A preprocessor would read source code, extract SQL statements, compile them against the database, and generate calls to the database client library. This solved impedance mismatch by offering syntactic fusion between the host language and SQL. The preprocessor was a separate build step that many developers forgot to run, leading to subtle bugs. Modern approaches use parameterized queries and ORM frameworks instead.

← Back to the lexicon