On 2016/01/19 8:14 AM, Ali Moradi wrote:
> Hi, i am working on a python 2.x and Tkinter program. My table have 2
> fields. How can i get a specific row? Should i write :
> SELECT * FROM (table-name) WHERE IDENTIFICATION == 1
>
> How can i get the row id? Thanks.

Adding to other replies - you could of course simply query the row id, 
like so:

SELECT * FROM t WHERE rowid = 1;

Beware though that since SQLite 3.8.2 it is possible to declare a table 
without a row-id (see WITHOUT ROWID: 
https://www.sqlite.org/withoutrowid.html) so you might need to be check 
for the existence of a row id before querying it if you did not make the 
table yourself.


Reply via email to