sqldatabasesqlitetablecolumnrowid

How to get ROWID in SQLite?


consider this simple table(tbl1):

A|first letter
B|second letter
C|third letter

first column is letter and second column is desc

I can do this query without any problem:

select * from tbl1 where letter='B'      -->>second letter

My question is: how I can get(retrieve) the ROWID of the result row?


Solution

  • SELECT rowid, * FROM tbl1 WHERE letter = 'B'