SQL Tutorial


MaxDB is a relational database system with an SQL interface. The MaxDB data is organized in tables. You can use a set of simple SQL (Structured Query Language) statements based on English to perform a wide range of operations on data and tables in MaxDB.

This SQL tutorial is designed to introduce you to the SQL language using the MaxDB database system.

Implementation Considerations

For information on where to obtain MaxDB software and how to install it, see the Download section and the Installation Manual.

Additional information can be found in the Concepts of the Database System documentation. For quick access to all documentation and an explanation of the most important terms, use the alphabetical Glossary.

For a detailed description of SQL syntax, see the SQL Reference Manual.


Demo Data

To work through the examples in this SQL tutorial, you need the demo data for the SQL tutorial.

This demo data was developed for practice and testing purposes and contains several predefined demo users and demo data in the HOTEL demo schema.

Do not use the demo data in a production system.

Example SQL Statements

The SQL statements that are described in the examples in this tutorial can be grouped in the following areas:

?     The SELECT statement enables data to be selected from a table by row or column. Rows in several tables can be linked together. Data can be sorted, grouped, and calculated.
For examples, see Data Query.

?     An additional group of statements is used to define and redefine the table structure and other database objects.
For examples, see Data Definition.

?     The INSERT statement can be used to insert rows and the DELETE statement to delete rows. The UPDATE statement can be used to make changes.
For examples, see Data Manipulation.

?     An additional group of statements is used to control data access authorizations for users and user groups.
For examples, see Authorization.

?     When performing checks, it is often helpful to evaluate the system tables.
For examples, see Evaluating System Tables (Examples).

To make SQL statements more readable, the keywords are written in upper-case letters and the SQL statements are structured. Upper and lower-case spellings of syntax elements and blank characters or line breaks are not relevant for executing SQL statements.

Upper and lower-case letters, however, may be important when choosing identifiers for the database objects and entering values in the form of literals.

See also:

Concepts of the Database System, Demo Database