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
please give the remaining answers.
If A is the super class of B. And both the classes have constructor. We create an object of class B. Then which constructor will be called? If both then in which order?
How would you set the formatting options statically and dynamically within a report?
How can we decide weather we can enhance the standard infotype or not ? : abap hr
how do you call third selection screen ?
What is the function of the correction system? : abap data dictionary
What is the t-code to display batch input sessions? : abap bdc
What is the use of at new statement ?
What is off cycle payroll run
What are the functional areas? User groups?
Can we define our own match code id's for sap matchcodes ?
Name some system global variables you can use in abap programs?
What is a modification assistant?
What are the advantages and disadvantages of different types of bdc's?
there are 2 selection screens. material num in screen 200 and plant in screen 300. so how can you write in INITIALISATION event?