encyclopegia.org

Embedded SQL

Embedded SQL is a method of combining the computing power of a programming language and the database manipulation capabilities of SQL. Embedded SQL statements are SQL statements written inline with the program source code, of the host language. The embedded SQL statements are parsed by an embedded SQL preprocessor and replaced by host-language calls to a code library. The output from the preprocessor is then compiled by the host compiler. This allows programmers to embed SQL statements in programs written in any number of languages such as C/C++, COBOL and Fortran. This differs from SQL-derived programming languages that don't go through discrete preprocessors, such as PL/SQL and T-SQL. The SQL standards committee defined the embedded SQL standard in two steps: a formalism called Module Language was defined, then the embedded SQL standard was derived from Module Language. The SQL standard defines embedding of SQL as embedded SQL and the language in which SQL queries are embedded is referred to as the host language. A popular host language is C. Host language C and embedded SQL, for example, is called Pro*C in Oracle and Sybase database management systems, ESQL/C in Informix, and ECPG in the PostgreSQL database management system. SQL may also be embedded in languages like PHP etc.…

Embedded SQL is a method of combining the computing power of a programming language and the database manipulation capabilities of SQL. Embedded SQL statements are SQL statements written inline with the program source code, of the host language. The embedded SQL statements are parsed by an embedded SQL preprocessor and replaced by host-language calls to a code library. The output from the preprocessor is then compiled by the host compiler. This allows programmers to embed SQL statements in programs written in any number of languages such as C/C++, COBOL and Fortran. This differs from SQL-derived programming languages that don't go through discrete preprocessors, such as PL/SQL and T-SQL. The SQL standards committee defined the embedded SQL standard in two steps: a formalism called Module Language was defined, then the embedded SQL standard was derived from Module Language. The SQL standard defines embedding of SQL as embedded SQL and the language in which SQL queries are embedded is referred to as the host language. A popular host language is C. Host language C and embedded SQL, for example, is called Pro*C in Oracle and Sybase database management systems, ESQL/C in Informix, and ECPG in the PostgreSQL database management system. SQL may also be embedded in languages like PHP etc. The SQL standard SQL:2023 is available through purchase and contains chapter 21 Embedded SQL and its syntax rules. === Mimer SQL=== Mimer SQL for Linux, macOS, OpenVMS and Windows support embedded SQL. C/C++ Embedded SQL for C/C++ is supported on Linux, macOS, OpenVMS and Windows. COBOL Embedded SQL for COBOL is supported on OpenVMS. Fortran Embedded SQL for Fortran is supported on OpenVMS.

References

No reference rows published for this article.

Cite this article

MLA

"Embedded SQL." encyclopegia.org, 2024, https://encyclopegia.org/wiki/embedded-sql. Accessed 24 November 2026.

Chicago

"Embedded SQL." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/embedded-sql.

APA

encyclopegia.org. (2024). Embedded SQL. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/embedded-sql

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Sportal

enwiki · references available

Tony Fenton

enwiki · references available

Gosport Borough Council

enwiki · references available

National Centre for Circus Arts

enwiki · references available

Asymbolus

enwiki · references available

Aulohalaelurus

enwiki · references available

Vulcain (rocket engine)

enwiki · references available

Hengrave

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1258408348 · 0.5 · snapshot enwiki-001258408348

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.