another fix for rowid in SQL