My Query is SELECT DefaultId FROM tblsample where ('567' = DefaultId) || ('567' = Name)
In the above query
table name = tblsample
Column Names = DefaultId , Name
Input Value = 567
Now i want to check this value is available in which column from the table and return its DefaultId. I am able to achieve this in Sqlite, want to know is there still better way to optimize the query and In android using
database.query(boolean distinct, String table, String[] columns,String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
which query i must use in android.