Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Differences between open SQL and native SQL

Former Member
0 Likes
1,101

Hi,

can anyone tell me the differences between open SQL and native SQL?

thanks in advance.

qiuguo

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
960

Open SQL refers to commands that can be translated into statements of any other SQL language.

For Example :

MS-SQL Server and Oracle both are databases. There are two different languages that are used to query these databases and get results. Somme commands exist only in MS-SQL and some only in Oracle.

Open SQL is used when we want tp write queries that will work on any underlying database. It contains only those commands which can be translated into any underlying databases command.

Hope this helps.

5 REPLIES 5
Read only

Former Member
0 Likes
961

Open SQL refers to commands that can be translated into statements of any other SQL language.

For Example :

MS-SQL Server and Oracle both are databases. There are two different languages that are used to query these databases and get results. Somme commands exist only in MS-SQL and some only in Oracle.

Open SQL is used when we want tp write queries that will work on any underlying database. It contains only those commands which can be translated into any underlying databases command.

Hope this helps.

Read only

Former Member
0 Likes
960

Hi,

There is an interface between our R/3 system and Database.

Using this interface. You can write open SQL statements to accsess Database. Here we don't bother whether it is Oracle, Informix etc. So the statement syntax will not be dependent on Database underlying.

In Native Sql we don't access thru Interface.Directly we access Database.So we need to Write the statements in the correct syntax. i.e Database dependent.This is faster but if you use this there will be some inconsistency. So always better use Open SQL

Regds,

Vinsa.R

Read only

Former Member
0 Likes
960

hi,

Information is retrieved from the data base for use in out programs via a special language known as structured query language (SQL). SQL is a language designed for the use with relational data base systems.

Open SQL is a subset of native SQL . SQL has been divided into two parts.

> Open SQL can recognized by the ABAP program.

> They are 10 SQL statements out of which we use only 5.

1. Select.

2. Insert.

3. Delete.

4. Modify.

5. Update.

6. Fetch.

7. Open Cursor.

8. Close Cursor.

9. Roll Back.

10. Commit.

out of which we use only the first 5.....

> Native SQL. cannot be recognized by the ABAP program.

> To execute Native SQL

Exec SQL.

.......

.......

......

End Exec.

as it cannot be recognized by the ABAP we go for Open SQL.

If this has helped u solve ur problem then dont forget to reward them with pointrs.

with regards,

madhuri.

Read only

Former Member
0 Likes
960

hi,

Open SQL allows you to access database tables declared in the ABAP Dictionary regardless of the database platform that you R/3 System is using. Native SQL allows you to use database-specific SQL statements in an ABAP program. This means that you can use database tables that are not administered by the ABAP Dictionary, and therefore integrate data that is not part of the R/3 System.

As a rule, an ABAP program containing database-specific SQL statements will not run under different database systems. If your program will be used on more than one database platform, only use Open SQL statements.

u can also have a look at the foll. link if u need more details:

http://help.sap.com/saphelp_46b/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/content.htm

regrads

navjot

reward if helpful

Read only

Former Member
0 Likes
960

i got it.

thanks.