SQL
SQL is the primary language for querying and manipulating data in HANA, and SQLScript extends it for database-side procedural logic. Strong SQL skills let you exploit HANA’s speed through the code-to-data paradigm.
ABAP developers mostly use Open SQL and CDS (which generate HANA SQL), but understanding native HANA SQL/SQLScript helps you write efficient CDS, optimise, and work directly with HANA when needed.
- HANA supports standard SQL for the usual SELECT/INSERT/UPDATE/DELETE plus rich analytical features (window functions, aggregations…
- SQLScript adds procedural constructs (variables, control flow, table variables) so you can implement more complex logic as stored…
- The guiding principle on HANA is code-to-data: bring the computation to where the data lives (the database) rather than moving…
- Watch out: Row-by-row processing instead of set-based SQL.
HANA SQL
HANA supports standard SQL for the usual SELECT/INSERT/UPDATE/DELETE plus rich analytical features (window functions, aggregations, joins). Because HANA is columnar and in-memory, set-based SQL that aggregates and filters in the database is extremely fast, far better than pulling rows out and looping.
SQLScript for logic
SQLScript adds procedural constructs (variables, control flow, table variables) so you can implement more complex logic as stored procedures and functions that run inside HANA. This is central to code pushdown: move data-intensive logic to the database instead of the application server.
Code-to-data
The guiding principle on HANA is code-to-data: bring the computation to where the data lives (the database) rather than moving large data sets to the application. Well-written SQL/SQLScript and CDS embody this, delivering big performance gains over row-by-row ABAP.
In the SAP context
ABAP developers mostly use Open SQL and CDS (which generate HANA SQL), but understanding native HANA SQL/SQLScript helps you write efficient CDS, optimise, and work directly with HANA when needed.
Common pitfalls
- Row-by-row processing instead of set-based SQL.
- Pulling data out rather than pushing logic down.
- Ignoring window/aggregate functions HANA does well.