Entering content frame

Function documentation SQL Features Locate the document in its SAP Library structure

Use

You can operate the MaxDB database system in one of the following SQL modes:

·        INTERNAL: Database system-internal definition

·        ANSI: ANSI standard according to ANSI X3.135-1992, Entry SQL

·        DB2: Definition of DB2 Version 4

·        ORACLE: Definition of ORACLE7

For more information about the differences between INTERNAL and ORACLE, see the SQL Mode ORACLE documentation. For a detailed explanation of the SQL syntax, see the Reference Manual.

To achieve good performance when executing SQL statements, the database system uses among other things an SQL Optimizer, Shared SQL and Load Balancing.

Features

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).

For more information, see the Reference Manual in Data Type (data_type).

Selected SQL features of MaxDB

Name

SQL Statement

Foreign key, referential integrity

Referential CONSTRAINT Definition (referential_constraint_definition)

Database procedure (Stored Procedures)

CREATE DBPROC Statement (create_dbproc_statement)

Trigger

CREATE TRIGGER Statement (create_trigger_statement)

Updatable view (also JOIN views)

CREATE VIEW Statement (create_view_statement)

Function

Function (function_spec), such as arithmetic function, date function, conversion function

Sub-transaction

SUBTRANS Statement (subtrans_statement)LLLINK

Number generator (auto-increment column)

CREATE SEQUENCE Statement (create_sequence_statement)

Schema

CREATE SCHEMA Statement (create_schema_statement)FFFFRAGE

Sub-SELECT

Table Expression (table_expression)

Outer join

JOIN Predicate (join_predicate)

Server-side cursor

FETCH Statement (fetch_statement)

DECLARE CURSOR Statement (declare_cursor_statement)

Temporary table

CREATE TABLE Statement (create_table_statement)

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

LOCK Statement (lock_statement)

LOCK Option (lock_option)

See also Locks.

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

Activities

The following database tools are available for entering SQL statements:

·        SQL Studio (GUI, only for Microsoft Windows)

·        SQLCLI (command line for all supported operating systems)

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

 

Leaving content frame