warning: file_get_contents( [function.file-get-contents]: failed to open stream: HTTP request failed! in /var/www/ : eval()'d code on line 4.


Integrated, Native SQL

One of the major features of 4D v11 SQL is its integrated, native SQL language.

The 4D v11 SQL language allows you to connect directly to an ODBC data source and to execute SQL queries inside  "Begin SQL" and "End SQL" tags (and via the new 4D command: QUERY BY SQL).

This database shows how to carry out queries with the 4D language as well as with SQL.

Specific examples show both languages in parallel in order to compare them easily and to highlight their respective advantages. Comments and explanations are provided during the execution of these queries.

One example illustrates a simple query (which consists of finding the airports of a specific city and country).


A second example illustrates a join (which consists of finding from among a selection of airports those that can be accessed via a direct flight).


A third illustrates a complex SQL query written simply using the 4D language. 


A fourth example shows a complex 4D query illustrating "nested" queries in SQL.


Download for Windows or Mac




More resources