‎2007 Aug 10 12:38 PM
hi to all,
select single *
select to up to n rows
in the above statements which is better in performance.and pls let me know in which constraints tht we can use above statements.
thanx and regards,
loki
‎2007 Aug 10 12:43 PM
select single *: This helps you to select 1 record....
select to up to n rows: This helps you to select 'n' records,
Depending upon your requirement, you use them ....
Regards,
Pavan
‎2007 Aug 10 12:40 PM
well you can NOT compare those two.
Select single will get you ONE record only ALWAYS.
while select up to n rown will get you n records if there are enough. otherwise, if there are less than n records it will give you all.
‎2007 Aug 10 12:43 PM
Hi Lok
If u know the complete key in where codition use select single
if u dont use upto n rows ( if u have part of key in where condition )
select single is best when u r specifing all key fields in where condition
reward points to all helpful answers
kiran.M
‎2007 Aug 10 12:43 PM
HI
SELECT SINGLE IS THE BETTER IN THE PERFORMANCE POINT OF VIEW
SELECT SINGLE ;- IF THERE 100 ENTRIES IN T HAT THERE ONLY ONE CORRESPONDING ELEMENT FOR UR REQ THEN
THIS QUERY WILL SEARCH FOR SINGLE ENTRY HIT AS EARLY AS POSSIBLE IT HITS THAT RECORD IT WILL GIVE OUT PUT
SELECT UP TO N ROWS ;-IT WILL GET THE VALUES UP TO N ROW S
PERFORMANCE POINT OF VIEW SELECT SINGLE IS THE BETTER THAN SELECT UP TO
REWARD IF USEFULL
‎2007 Aug 10 12:43 PM
select single *: This helps you to select 1 record....
select to up to n rows: This helps you to select 'n' records,
Depending upon your requirement, you use them ....
Regards,
Pavan
‎2007 Aug 10 12:44 PM
They both give different output
one returns a table and the other a structure
If you want to know the difference between select single and select up to 1 rows
http://www.sap-basis-abap.com/abap/difference-between-select-single-and-up-to-1-row.htm
http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci1143073,00.html