‎2007 Jun 20 7:25 AM
can any one please tell me the exact difference between select * and select single
what difference will appear in the output.
‎2007 Jun 20 7:30 AM
Hi,
Select * will select all the records which satisfy the where condition clause,
But in Select Single it will select only the single first entry in the DB table which satisfy the where condition clause.
Regards,
Ranjit Thakur.
<b>Please Mark The Helpful Answer.</b>
‎2007 Jun 20 7:30 AM
Hi Hemaltha,
Selecr * will fetch all the Records from the table for the given <b>where condition</b>,
Select Single will fetch only one Record from the table for the given <b>where condition,</b>
‎2007 Jun 20 7:32 AM
hi..
<b>select *</b> will fetch all the records according to the where condition
<b>select single</b> will fetch only the single record
according to the where condition
Thanks
Ashu
‎2007 Jun 20 7:33 AM
Hi,
SELECT SINGLE is an option we use only when we know the full key of the table, not when we know that there will be only one record. So if you are selecting from MARA and your WHERE condition has MATNR in it, then you should use SELECT SINGLE. But if your WHERE condition has BISMT(old material number) and even if you know that it will result in one record only, you should not use SELECT SINGLE. It is not that it will give you an error but if you do an extended check, there it will show it as a warning saying that you didn't use the full key and that there is a possibility that there could be more than one record.
Select * -
selects all fields from the database table.
Regards,
Priyanka.
‎2007 Jun 20 7:34 AM
hi,
select * will fetch all the records from database table .( data for all rows and all coumns for a particular row)
select single will fetch only one row ( mean to say all coums for that particular row only)
regards,
sudha
‎2007 Jun 20 7:35 AM
<b>SELECT *</b> for selecting all fields of table rows which meets the condition in WHERE clause.
For e.g
<b>SELECT vblen</b> for selecting only VBELN field of table rows which meets the condition in WHERE clause
<b>SELECT SINGLE</b> for selecting only 1 row even if the more rows are available for condition in WHERE clause. Mostly we should specify all primary key fields in WHERE for SELECT SINGLE.
Reward if its useful
Regards,
Sail
‎2007 Jun 20 7:38 AM
hi hemalatha,
the difference is
if u write
select * from mara where ernam='rudisill'.
this will return all rows with ernam with the value rudisill.......
if u write
select single * from mara where ernam='rudisill'.
it will return only one row ...
based on your requirement u can use the select statement ....in some case u may want one one row to be returned in that case u can use (select single statement)
reward if usefull..........
‎2007 Jun 20 7:38 AM
hi Hemal
http://www.sap-img.com/abap/difference-between-select-single-and-select-upto-one-rows.htm
Rewards if Helpful