a) the ID from the first row returned in the sub query
or
b) the minimum ("first") id from the ModificationTypes_ENUM
table ?
min() will give you b) however to get a) I think you will have to resort to whatever functions come with your DB because off hand I can't think of a set-based function in ANSI SQL that will do this (unless you can uniquely identify the required row in some way).
Example for SQL Server 2005 AdventureWorks database to illustrate the point:
select top 1 CreditCardID from Sales.ContactCreditCard
- gives you the CreditCardID value from the first row in the result set
select min(CreditCardID) from Sales.ContactCreditCard
- gives you the first CreditCardID in the table
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.