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

Difference between select into table & select - endselect

Former Member
0 Likes
2,199

What is the difference between select into table & select - endselect?

which has good performance?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,238

Select up to 1 rows has better performance as compared to select single in case all key fields are not there in WHERE clause.

7 REPLIES 7
Read only

Former Member
0 Likes
1,238

Hi,

There is no diff between select ... end select and select into table. both r same. performance wise select into table is best.

Regards,

S.nehru

Read only

Former Member
0 Likes
1,238

Hi,

check this thread

Regards,

Himanshu

Read only

Former Member
0 Likes
1,239

Select up to 1 rows has better performance as compared to select single in case all key fields are not there in WHERE clause.

Read only

Former Member
0 Likes
1,238

Hi,

SELECT INTO TABLE : Here all the data will be fetched atonce in internal table.So connecting the database for data is once.

SELECt .....END SELECT. It is just like loop.

Each time request will go to the database So connections to database are more.So performance of the program will get reduce...

Read only

Former Member
0 Likes
1,238

Hi,

Select into table is better since it hits the database only once, while select endselect keeps hitting till the records exhausts.

Regards,

Mayank

Read only

dhruv_shah3
Active Contributor
0 Likes
1,238

Hi,

If you use the select into table from some table for all entries,

then its better for performance,whereas the select..endselect itself is a one type of loop.

So its better to select into table.

HTH

Regards,

Dhruv Shah

Read only

Former Member
0 Likes
1,238

"Select into table" will fetch the entire data marked by query into the internal table.It is generally used data retrival.

But in some case the data requires to be modifed or manipulated before being place into internal table.In such a case we use "select - endselect".This allow to manipulate each row selected by the query in desired manner.

hope this answer your question !!