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

select statement

Former Member
0 Likes
392

Hi,

what is the difference between select single * and

select * upto one row

regards,

vijay.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
379
3 REPLIES 3
Read only

Former Member
0 Likes
380
Read only

Former Member
0 Likes
379

Hi Vijay ,

No difference functionally except that Select single * will give a warning in extended syntax check if you dont specify the full key of the table in where clause . Select * up to 1 rows will not give a warning in syntax check . If you have full key then use select single else use up to 1 rows .

Cheers

Message was edited by: Sanjay Sinha

Read only

Former Member
0 Likes
379

if you want to do a master check, single is better than UP TO 1 ROWS, the reason is the single only try to get the entry meet the condition, and return it back. But UP TO 1 ROWS try to select out all of the entries meet the condition, and after that, it return the first entry to our application.

So the performance difference is very obviously.

single select can't assure which entry will be return when multiple meet the condition. normally it will return the first entry it find out.

But in the master check case, it is enough.

thanks