SAP MaxDB is a relational database system with an SQL interface. The SAP 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 SAP MaxDB. This SQL tutorial is designed to introduce you to the SQL language using the SAP MaxDB database system.
For a detailed description of SQL statements, see the SQL Reference Manual documentation and the SQL Syntax description.
To work through the examples in this SQL tutorial, you need the demo data for the SQL Tutorial.
Note
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 these demo data in a production system.
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).
Note
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.