cancel
Showing results for 
Search instead for 
Did you mean: 

SQLScript VS PL/SQL

Former Member
0 Kudos

Is SQLScript a superset of PL/SQL? Can we use pure PL/SQL to create stored procedures and functions?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Dayong,

Conceptually, both Oracle PL/SQL and HANA SQLScript follow the ANSI Standard, but they have different syntaxes to implement that concept.

To answer your question, SQLScript is not a superset of PL/SQL and you would have to port PL/SQL procedures to follow SQLScript syntax, in order to execute them in HANA.

For e.g. In PL/SQL you have syntax as ' CREATE OR REPLACE Procedure ...' But SQLScript has 'CREATE PROCEDURE..' i.e. you have to drop the procedure manually everytime you modify it via SQL Console.

Refer the HANA SQL Script guide and SQL Reference guides.

http://help.sap.com/hana/SAP_HANA_SQL_Script_Reference_en.pdf

http://help.sap.com/hana/SAP_HANA_SQL_and_System_Views_Reference_en.pdf

~Tarun

lbreddemann
Active Contributor
0 Kudos

Sorry, but neither PL/SQL nor SQLScript (nor any other procedural add-on DB-language) follows the ANSI standard - since there is no ANSI SQL standard for procedural language extensions.

If there were one, it's pretty likely that most DBMS vendors would have just adopted it, like they did with SQL.

The question of porting PL/SQL code to SAP HANA has been discussed over and over here on SCN, so I recommend to read up on what's already here.

Bottom line still is: you will need to manually port your solution.

- Lars