You can use the Structured Query Language (SQL) to define, display, insert, change and delete data in the database. The database system executes SQL statements within transactions.

The SQL statements are divided into the following groups:

?     Data definition

?     Authorization

?     Data manipulation

?     Data query

?     Transactions

?     Statistics

For an introduction to the MaxDB SQL syntax, see the SQL Tutorial; for a complete description, see the SQL Reference Manual.


?     To program a database application, you can embed SQL statements in the programming language of your choice and send them to the database instance via an interface.

Users of the database application then enter SQL statements only implicitly.

?     You can explicitly enter SQL statements with the following database tools, among others:

0     SQL Studio (GUI, only for Microsoft Windows)

0     SQLCLI (command line for all supported operating systems)

0     Web SQL (web-based, for all supported operating systems)


In the MaxDB database system you can use the following data types, among others: BOOLEAN, CHAR[ACTER] (ASCII, BYTE, UNICODE), DATE, FIXED, FLOAT, INT[EGER], LONG (ASCII, BYTE,UNICODE) for saving BLOBs and CLOBs, SMALLINT, TIME, TIMESTAMP, VARCHAR (ASCII, BYTE, UNICODE). See the SQL Reference Manual, Data Type (data_type).

By working with the database system, you can choose the SQL mode. For more information about the differences between the SQL modes INTERNAL and ORACLE, see the SQL Mode ORACLE documentation.

Important SQL Properties of MaxDB


More Information


SQL Reference Manual, CREATE SCHEMA Statement (create_schema_statement)

Foreign keys

(referential integrity)

SQL Tutorial, Foreign Key Dependencies Between Tables

SQL Reference Manual, Referential CONSTRAINT Definition (referential_constraint_definition)

Explicit and implicit locks on rows, tables and the database catalog

SQL Reference Manual, Transactions

LOCK Statement (lock_statement)

LOCK Option (lock_option)

Updatable view table

SQL Tutorial, View Tables

SQL Reference Manual, CREATE VIEW Statement (create_view_statement)

Temporary table

SQL Reference Manual, CREATE TABLE Statement (create_table_statement)

Domain definition

SQL Tutorial, Domains

SQL Reference Manual, CREATE DOMAIN Statement (create_domain_statement)

Outer join

SQL Tutorial, Joins: Information from Several Tables

SQL Reference Manual, JOIN Predicate (join_predicate)


SQL Tutorial, Subquery: Inner Queries

SQL Reference Manual, Subquery (subquery)


SQL Reference Manual, SUBTRANS Statement (subtrans_statement)

Number generator (auto-increment column)

SQL Tutorial, Number Generators for Tables

SQL Reference Manual, CREATE SEQUENCE Statement (create_sequence_statement)

Database procedure (stored procedures)

SQL Tutorial, Database Procedures

SQL Reference Manual, CREATE DBPROC[EDURE] Statement (create_dbproc_statement)

Database function (user-defined function)

SQL Tutorial, Database Functions

SQL Reference Manual, CREATE FUNCTION Statement (create_function_statement)


SQL Tutorial Database Triggers

SQL Reference Manual,

CREATE TRIGGER Statement (create_trigger_statement)

CREATE SYSTEM TRIGGER Statement (create_system_trigger_statement)

Server-side cursor

SQL Reference Manual, DECLARE CURSOR Statement (declare_cursor_statement)

Shared SQL (re-use of execution plans)

Special Database Parameters SHAREDSQL


SQL Optimizer

You can find an overview of all SQL statements in the SQL Reference Manual under SQL Statements: Overview.

For information about restrictions, see the SQL Reference Manual, Restrictions for SQL Statements

See also:


Locks for Database Objects

Developing Database Applications

Overview of the Database System