Can I perform this Android query with ContentResolver.query()? (LEFT JOIN and CASE)

后端 未结 3 875
南方客
南方客 2020-12-02 23:20

I am looking to perform the following query (in pseudo-code) on Android:

SELECT C.ID, C.NAME, CASE ISNULL(G.GROUPID,0) = 0 THEN 0 ELSE 1 END INGROUP
FROM CO         


        
3条回答
  •  没有蜡笔的小新
    2020-12-03 00:16

    You can't do that because ContentResolver has only one query method:

        query(Uri uri, String[] projection, String selection, 
    String[] selectionArgs, String sortOrder)
    

    there's no parameter for tables or FROM clauses.

提交回复
热议问题