简体   繁体   中英

Get ROWID using INNER JOIN Python SQLite

I am trying get number column using INNER JOIN

SELECT rowid, * FROM table1
INNER JOIN table2
ON table1.name= table2.ID
WHERE name= "name"

It does't work.

How can i get rowid with joining two table?

Probably you should point from which table is should be taken? Something like this:

SELECT t1.rowid, t1.*, t2.* FROM table1 t1
INNER JOIN table2 t2
ON t1.name = t2.ID
WHERE t1.name = "name"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM