SQL Statements in SAP HANA

 

Hello Everyone,

The first and foremost thing we will look for when we think about working on most of the databases is the syntax to perform different activities/operations in the respective database system.

This is same with SAP HANA database as well. It is always best to have a simple reference guide which gives syntaxes to perform most common activities in the database like creating table, creating index, deleting data from table, drop table and so on.

In separate articles, we will be covering in detail the syntax for most commonly performed SQL operations in SAP HANA database so that everyone can use this as reference guide in their day to day job activities.

 SQL statements in SAP HANA are separated into 10 different categories as shown below.

1

 

  • Data Definition Statements (DDS)
  • Data Manipulation Statements (DMS)
  • Procedural Statements (PS)
Data Definition Statements (DDS) category covers below the SQL operations.

  • ALTER FULLTEXT INDEX
  • ALTER INDEX
  • ALTER SEQUENCE
  • ALTER TABLE
  • ALTER VIRTUAL TABLE
  • COMMENT ON
  • CREATE FULLTEXT INDEX
  • CREATE INDEX
  • CREATE SCHEMA
  • CREATE SEQUENCE
  • CREATE STATISTICS
  • CREATE SYNONYM
  • CREATE TABLE
  • CREATE TRIGGER
  • CREATE VIEW
  • DROP INDEX
  • DROP SCHEMA
  • DROP SEQUENCE
  • DROP STATISTICS
  • DROP SYNONYM
  • DROP TABLE
  • DROP TRIGGER
  • DROP VIEW
  • REFRESH STATISTICS
  • RENAME COLUMN
  • RENAME INDEX
  • RENAME TABLE

Please go through article ‘Data Definition Statements in SAP HANA’ to know the syntax for each of the above operations.

Data Manipulation Statements (DMS) category covers below SQL operations that can be performed on SAP HANA database.

  • DELETE
  • EXPLAIN PLAN
  • INSERT
  • LOAD
  • MERGE DELTA
  • REPLACE | UPSERT
  • SELECT
  • TRUNCATE TABLE
  • UNLOAD
  • UPDATE

Please go through article ‘Data Manipulation Statements in SAP HANA’ to know the syntax for each of the above operations.

Procedural Statements (PS) category covers the below SQL operations that can be performed on SAP HANA Database.

  • ALTER PROCEDURE RECOMPILE
  • CALL
  • CREATE FUNCTION
  • CREATE PROCEDURE
  • CREATE TYPE
  • CREATE VIRTUAL FUNCTION
  • DO BEGIN…END
  • DROP FUNCTION
  • DROP PROCEDURE
  • DROP TYPE

Please go through article ‘Procedural Statements in SAP HANA’ to know the syntax for each of the above operations. 

  • Transaction Management Statements (TMS)
  • Session Management Statements (SNMS) 
  • Access Control Statements (ACS)
 Transaction Management Statements (TMS) category covers the below SQL operations that can be performed on SAP HANA Database.

  • COMMIT
  • LOCK TABLE
  • ROLLBACK
  • SET TRANSACTION

Please go through article ‘Transaction Management Statements in SAP HANA’ to know the syntax for each of the above operations.

 Session Management Statements (SNMS) category covers the below SQL operations that can be performed on SAP HANA Database.

  • CONNECT
  • SET HISTORY SESSION
  • SET SCHEMA
  • SET [SESSION]
  • UNSET [SESSION]

Please go through article ‘Session Management Statements in SAP HANA’ to know the syntax for each of the above operations.

Access Control Statements (ACS) category covers the below SQL operations that can be performed on SAP HANA Database.

  • ALTER AUDIT POLICY
  • ALTER CREDENTIAL
  • ALTER REMOTE SOURCE
  • ALTER SAML PROVIDER
  • ALTER USER
  • CREATE AUDIT POLICY
  • CREATE CREDENTIAL
  • CREATE USER
  • CREATE REMOTE SOURCE
  • CREATE ROLE
  • CREATE SAML PROVIDER
  • DROP AUDIT POLICY
  • DROP CREDENTIAL
  • DROP REMOTE SOURCE
  • DROP ROLE
  • DROP SAML PROVIDER
  • DROP USER
  • GRANT
  • REVOKE

Please go through article ‘Access Control Statements in SAP HANA’ to know the syntax for each of the above operations.

  • Data Import Export Statements (DIES)
  • System Management Statements (SMMS)
Data Import Export Statements (DIES): This category covers the below SQL operations that can be performed on SAP HANA Database.

  • EXPORT
  • IMPORT
  • IMPORT FROM
  • IMPORT SCAN

Please go through article ‘Data Import Export Statements in SAP HANA’ to know the syntax for each of the above operations. 

System Management Statements (SMMS): This category covers the below SQL operations that can be performed on SAP HANA Database.

  • ALTER SYSTEM ALTER CONFIGURATION
  • ALTER SYSTEM ALTER SESSION SET
  • ALTER SYSTEM ALTER SESSION UNSET
  • ALTER SYSTEM APPLICATION ENCRYPTION
  • ALTER SYSTEM ALTER TABLE PLACEMENT
  • ALTER SYSTEM CANCEL [WORK IN] SESSION
  • ALTER SYSTEM CLEAR AUDIT LOG
  • ALTER SYSTEM CLEAR SQL PLAN CACHE
  • ALTER SYSTEM CLEAR TRACES
  • ALTER SYSTEM DISABLE ALL ASYNCHRONOUS TABLE REPLICAS
  • ALTER SYSTEM DISCONNECT SESSION
  • ALTER SYSTEM ENABLE ALL ASYNCHRONOUS TABLE REPLICAS
  • ALTER SYSTEM LOAD PERFTRACE
  • ALTER SYSTEM LOGGING
  • ALTER SYSTEM PERSISTENCE ENCRYPTION
  • ALTER SYSTEM RECLAIM DATA SPACE
  • ALTER SYSTEM RECLAIM DATAVOLUME
  • ALTER SYSTEM RECLAIM LOG
  • ALTER SYSTEM RECLAIM VERSION SPACE
  • ALTER SYSTEM RECONFIGURE SERVICE
  • ALTER SYSTEM RECOMPILE SQL PLAN CACHE ENTRY
  • ALTER SYSTEM REMOVE TRACES
  • ALTER SYSTEM RESET MONITORING VIEW
  • ALTER SYSTEM SAVE PERFTRACE
  • ALTER SYSTEM SAVEPOINT
  • ALTER SYSTEM START PERFTRACE
  • ALTER SYSTEM STOP PERFTRACE
  • ALTER SYSTEM STOP SERVICE
  • CREATE CERTIFICATE
  • DROP CERTIFICATE
  • SET SYSTEM LICENSE
  • UNSET SYSTEM LICENSE ALL
  • ALTER PSE
  • CREATE PSE
  • DROP PSE
  • SET PSE
  • UNSET PSE

Please go through article ‘System Management Statements in SAP HANA’ to know the syntax for each of the above operations.

  • Workload Management Statements (WMS)
  • Tenant Database Management Statements (TDMS)
Workload Management Statements (WMS) category covers the below SQL operations that can be performed on SAP HANA Database.

  • CREATE WORKLOAD MAPPING
  • ALTER WORKLOAD MAPPING
  • DROP WORKLOAD MAPPING
  • CREATE WORKLOAD CLASS
  • ALTER WORKLOAD CLASS
  • DROP WORKLOAD CLASS

Please go through article ‘Workload Management Statements in SAP HANA’ to know the syntax for each of the above operations.

Tenant Database Management Statements (TDMS) category covers the below SQL operations that can be performed on SAP HANA Database.

  • CREATE DATABASE
  • DROP DATABASE
  • ALTER DATABASE
  • ALTER SYSTEM START DATABASE
  • ALTER SYSTEM STOP DATABASE

Please go through article ‘Tenant Database Management Statements in SAP HANA’ to know the syntax for each of the above operations.

With this we have looked at different SQL statement categories and SQL operations that can be performed on SAP HANA database. Please browse through the articles mentioned above to know more in detail about each statement in each category and their syntax.

Thank you for reading and hope this information is helpful. Please do share with your friends if you feel the information is useful.

Happy Learning.

Check Also

Capture

SAP HANA – SQL Transaction Management Statements

Hello Everyone, In this article, we are going to look at different SQL Transaction Management …

Leave a Reply

Your email address will not be published. Required fields are marked *

1 × four =