Reputation: 51
I'm numbering each row of the table
In my program I used the database SQLite
I use the following code in SQL sever:
SELECT ROW_NUMBER()over (order by len(GoodsID)), LEN(GoodsID) as 'length'
FROM inv.tblGoods
GROUP BY LEN(GoodsID)
ORDER BY LEN(GoodsID)
I want using the above code in SQLite .
But I do not know the equivalent ROW_NUMBER ?
Any help on either of these is greatly appreciated!
Upvotes: 0
Views: 225
Reputation: 54682
you can implement it by creating another column in your table like this
row_number integer primary key autoincrement
Then get the row number by select row_number
Upvotes: 1