Lets say I have this View on MyTable:
CREATE VIEW MyView (IDValue, LastName, FirstName)
AS SELECT IDValue, LastName, FirstName FROM MyTable;
Is there a way in the View that I can tell that data is being retrieved versus data just being counted?
E.g., Data retrieved:
SELECT FirstName FROM MyView;
Data Counted - no column data retrieved:
SELECT COUNT(*) WHERE FirstName IS NOT NULL;
My research shows that there is not, but I was hoping that someone knew of a technique.
Thanks.