I need to count the total number of rows in a table before the certain row ID.
I have this query
select count (ClientID)
FROM [Seek].[dbo].[seekClient]
where ClientID < '12'
which works fine for the case of integer primary key, but I am not sure how to do that in case of GUID ??
Kindly help me in this case.
Thanks
Short answer, this isn’t possible, see this link. Most specifically:
Long answer – what’s the rest of your table structure? There may be a different way to do what you’re trying to do (I would imagine it’s possible using a date created field if you have one)