How to retrieve a value from a particular column through cursor in android?
I am executing a query to select the maximum salary of an employee. The result is stored in the cursor. How can I get the va开发者_开发知识库lue of the maximum(salary) from the cursor?
Please follow the below code .
cursor.getInt(cursor.getColumnIndex("your field")));
select MAX(SALARY) as BigSalary FROM Employee
cursor.getInt(cursor.getColumnIndex("BigSalary"));
精彩评论