Handling _RowNumber in SQL

(Bellave Jayaram) #1

I have an app based on GSheet where I am using _RowNumber in some VCs - basically, I will have multiple rows with same value in a given column and I want to identify the first of these rows.

I want to move this app to SQL but I am not sure I can use _RowNumber. Does AppSheet still provide a _RowNumber column for SQL data? If not, how can I mark a certain row which is one among a set of “identical” rows (because all these rows have the same value in one column) as being somehow “special” ?


(Reza Raoofi) #2

Usually _RowNumber’s equivalent in SQL databases is something called IDENTITY attribute (in SQL Server), or AUTO_INCREMENT (in MySQL), etc. it is often considered Primary Key too, so you can always rely on its uniqueness and know which row was entered first, but they are auto-filled by the database engine. They have to be added to table’s column structure by database owner, so AppSheet cannot use them as _RowNumber, as they are not a fixed part of structure like you see in spreadsheet row numbers.

1 Like
(Bellave Jayaram) #3

Thanks @Reza. I believe this is sufficient for my purpose.