What is the diffrence between select single * and Select
upto 1 row?
Answer Posted / ad
The SELECT SINGLE statement selects the first record in the
database table depending on the condition mentioned in the
WHERE clause. Only the first record is returned and may not
be unique. ENDSELECT keyword is not needed here.
But for the case of SELECT UPTO 1 ROW, all relevant records
are being selected depending on the WHERE clause. Then any
aggregate or grouping or ordering condition is applied to
them and only the 1st record from the resultant set is
being returned. ENDSELECT is must here.
SELECT SINGLE should be used for selecting with full
primary key combination but SELECT UP TO 1 ROWS is the
special case of SELECT UP TO n ROWS and can be used with
any WHERE condition.
As regarding the speed or performance it depends on various
conditions. If your database table contains several
entries, then SELECT UPTO 1 ROWS might take a longer time
to fetch and order all relevant records. But for limited
entries check for full primary key combination takes more
time in case of SELECT SINGLE. If you donot provide all
primary keys in SELECT SINGLE you will get message during
extended syntax check (SLIN).
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What is sap abap tables?
What are Delivery classes? What data will you want to transport during client copy?
Explain the data types of internal tables?
What does an exec sql statement do in abap?
What is full form of bdc session? : abap bdc
Difference between stand alone CRM and back-end CRM
What are different types of parameters?
What is pakey structure, pshd1 structure and what type of fields it contains? : abap hr
Is it possible to pass data to and from include programs explicitly?
What is the max no of match code id's that can be defined for one match code object? : abap data dictionary
What is the differences between abap and ooabap. In which situation we useooabap?
What is personnel sub are
MY DOMAIN IS SAP-ABAP COMPARE TO WEBDYNPRO AND CRM-TECHNICAL WHICH IS BEST?
Explain the advantages and disadvantages of different types of bdc's?
Mention some important events in abap programming.