Use EXISTS , and return true false
if you want to check some specific row and some condition , do this trick
Query("SELECT EXISTS(SELECT * FROM tableName WHERE id = :id)")
fun isRowIsExist(id : Int) : Boolean
or simple use this
@Query("SELECT EXISTS(SELECT * FROM tableName)")
fun isExists(): Boolean
Comments
Post a Comment
Thanks For your comment.