Defining the development terms SELECT SINGLE and SELECT UP TO 1 ROWS

Defining the development terms SELECT SINGLE and SELECT UP TO 1 ROWS

What is the difference between the terms SELECT SINGLE and SELECT UP TO 1 ROWS?

    Requires Free Membership to View

    When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchSAP.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSAP.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

Some people feel that SELECT SINGLE should only be used when the key fields are fully specified in the where clause. This is reflected in the SAP documentation, and in the extended syntax checker which will highlight this as a warning.

However, it does not take into account that there may be other field combinations which might also be a unique index, nor that you may simply be doing an existence check, or that you the fields you are interested may remain constant over the where clause specified.

I think SELECT SINGLE is more readable, and therefore better. Others think that it is ambiguous, so SELECT UP TO 1 ROWS is better.

This was first published in October 2005