A table contains records of Ice Cream flavors. There is a primary id
field (INT) and a varchar for flavor.
I need to get the row in the very middle of the table, however I can't
assume that the table's primary id field will be entirely sequential
across the table because some records may have been deleted.
Say there are 10 records in the table and the last primary id is 24.
I can't reliably devide 24 by 2 to assume the middle row is 12 because
perhaps the first 10 records were deleted.. that would mean my
"middle" row is actaully nearer to the beginning of the record set.
Is there something I can do with the total number of rows in the
table, to get the 'middle'-most row?
If I'm being too confusing ask and I'll reexplain.
Thanks!