Skip to main content
3 of 3
deleted 8 characters in body

Basically you CAN run any SQL-statement towards your database, as ArcGIS does this internally also. However the question is: why should you want to do this? In particular there is no gain on using this kind of statement towards your current approach. When you´re interested in a single value of one single row you may limit the selected columns as done by SubFields = ... in combination with a recycling-cursor.

Only improvement is to simply ommit the while-loop and take the very first feature returned by the cursor:

var cursor = myTable.Search(...);
var row = cursor.NextRow();

EDIT: You should allways release the cursor either via ComReleaser-class or by calling Marshall.ReleaseComObject.