开发者

How to retrieve a value from a particular column through cursor in android?

开发者 https://www.devze.com 2023-02-16 04:49 出处:网络
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 t

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"));
0

精彩评论

暂无评论...
验证码 换一张
取 消