If you wanna to get only 1 record try use TOP
statement.
ie:
OBJECTID IN (SELECT TOP 1 OBJECTID FROM 'customers' ORDER BY OBJECTID))
but you have note that this is bypass because TOP
and LIMIT
arent supported by geodatabase http://forums.arcgis.com/threads/68997-TOP-100
EDIT
I digged deeper cause this subject seems to me as interesting, and I found this kind of script: http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=E780BB87-1422-2418-7FD8-A1A0D8167AAF it returns a subset of features with the same schema as oryginal. It's made in python so, maybe you could use it as geoprocessing service as gate to your sql queries.
EDIT2
From more research i think that using TOP
LIMIT
or ROWNUM
depends on your DB engine. But the main clue is to use it as subquery - because we only can get access from WHERE
part of statement by using API
NOTE FOR 10.2 USERS: This will not work because it defaults to standardized queries which don't allow subqueries. You can turn off standardized queries, but this is not recommended since it makes SQL injection attacks easier to perform.
ORDER BY
?