 SQL
SQL 
To define, query, insert, change, and delete data in an SAP MaxDB database, you use the Structured Query Language (SQL).
To program a database application, you can embed SQL statements in a programming language and send them to the database via one of the SAP MaxDB interfaces. Users of the database application then only implicitly enter SQL statements. More information: Database Administration, Developing Database Applications
For development and tests you can explicitly enter SQL statements using the following database tools:
Database Studio (GUI)
SQLCLI (command line)
The SQL statements are divided into the following groups: data definition, authorization, data manipulation, data query, transactions, and statistics.
More information:
Introduction to the SAP MaxDB SQL syntax: SQL Tutorial
Complete SQL syntax description: SQL Syntax List
SQL Reference Manual, SQL Statements: Overview
SQL Reference Manual, Restrictions for SQL Statements
| Property | More information | 
|---|---|
| Schema | SQL Tutorial, Schemas 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 | 
| 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) | 
| Join | SQL Tutorial, Joins: Information From Several Tables SQL Reference Manual, JOIN Predicate (join_predicate) | 
| Subquery | SQL Tutorial, Subquery: Inner Queries SQL Reference Manual, Subquery (subquery) | 
| Subtransaction | 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) | 
| Triggers | 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 UseSharedSQL | 
| Optimization | 
| Data Type | Description in SQL Reference Manual | 
|---|---|
| BOOLEAN | |
| CHAR[ACTER] (ASCII, BYTE, UNICODE) | |
| DATE | |
| FIXED | |
| FLOAT | |
| INT[EGER] | |
| CLOB [ASCII] CLOB UNICODE BLOB | In earlier database versions, this data type was known as LONG. | 
| SMALLINT | |
| TIME | |
| TIMESTAMP | |
| VARCHAR (ASCII, BYTE, UNICODE) | 
More information: SQL Reference Manual, Data Type (data_type)
You can choose between two SQL modes: INTERNAL and ORACLE.
More information: SQL Mode ORACLE