¿ªÔÆÌåÓý

Re: Database Rows


 

¿ªÔÆÌåÓý

As Duane said, that ID won't help once rows are deleted. ?Here's the reason why;?

the ID number in any database is assigned to each record (eg each person in the database) not to the row. You could scramble/re-sort the list and the numbers would move with their records. ?Eg
1 Betty
2 Carol
3 Alan

Sorted by name Becomes;
3 Alan
1 Betty
2 Carol

The ID ?number is thrown away with the record (eg person) when it is deleted, because it belongs to them uniquely and cannot be reused for another record. So if Betty is deleted the list is

3 Alan
2 Carol

So the integer you see is NOT a row counter like you'd see in excel, where each row has a number, and you can scroll to the end of a list to see the number of rows.?

Some databases don't even use integers for this unique ID. Sometimes it's a mix of letters and numbers, sometimes an email address could be used as a unique ID so long as it IS unique so 2 people don't share it!?

In that situation it is much more intuitively clear; the email address is deleted if the person is deleted; it is a part of their record. Same with the ID.



On Sep 3, 2019, at 22:56, Maureen <maureenthomasdesigns@...> wrote:

Hi, I searched here as best I could but could not find an answer to my question.? I understand that column "ID" in a database contains row entry numbers and that an ID number is removed from view if its row is deleted.? So - the ID column does not represent row numbers.? Is there a way to determine the number of rows in a database without a visual count?

Thanks!

Join [email protected] to automatically receive all group messages.