Which code is more optimal?
SQLCommand.ExecuteScalar()
in C#
or
Top 1
in SQL?
I know, i could run tests, just though there might be someone with an answer in his pocket.
Thanks!
Edit: Assuming that there is only one column column being displayed.
Obviously Select Top 1 is more optimized with respect to performance as it will be executed directly at the database server. But yet the comparison is not valid as both are different things.