meta data for this page
  •  

Structured Query Language

SQL is the abbreviation for Structured Query Language. It is used to communicate with a relational database. According to ANSI (American National Standards Institute), it is the standard language for relational database management systems. It serves to define, manipulate, find and fetch data in a database.

Firebird and InterBase® conform closely to the international industrial standards SQL '92. There were a number of features introduced in Firebird 1.5 which comply to the more recent SQL-99 standard.

Furthermore Firebird and InterBase® offer a series of additional SQL enhancements, such as generators, triggers and stored procedures, allowing a more extensive modeling and manipulation of data. These enhancements are either based on the ANSI SQL2 Standard or already comply with the outline of the ANSI/ISO SQL3 standards.

DSQL - Dynamic SQL

DSQL is the subset in most common use today. It allows a program to create statements at run time. It can be used from conventional languages through the InterBase® API. More often, it is used from modern development environments such as Delphi, which hide the mechanics of the API. A completed DSQL statement is very much like the “embedded” language, without the EXEC SQL and without the terminating semicolon.

ESQL - Embedded SQL

The embedded form of SQL is used in programs written in traditional languages such as C and Pascal, started by the EXEC SQL statement. A preprocessor turns SQL statements into host language data structures and calls to the InterBase® server. The embedded language is written into the program; its statements cannot be generated dynamically. Statements in embedded SQL are terminated with a semicolon.

ESQL is invalid in stored procedures and triggers (just as procedure language (PSQL) ist not valid in ESQL); it can however execute stored procedures.

For further information, please refer to the Borland InterBase® 6.x Embedded SQL Guide.

isql - Interactive SQL

isql is a command-line utility program which can be used to run SQL queries on the database. isql supports data definitions and data manipulation commands as well as SQL scripts with multiple SQL commands within one script. It can be used to create and modify the database's metadata, insertion, alteration and deletion of data, data queries and the display of results (all this can be done in the IBExpert SQL Editor), adding and removal of user database rights (see IBExpert User Manager and Grant Manager) and execution of other database administrative functions. It is very similar to DSQL, with some omissions, such as cursors, and a few additions, for example, SET and SHOW.

isql commands end with ;. Each command must be explicitly committed using the commit statement.

See also:

Firebird Interactive SQL Utility

PSQL - Stored Procedure and Trigger Language

Please refer to the Stored procedure and trigger language chapter for further information.