SELECT MAX(SELECT MAX(LENGTH(`name`)) count FROM `student_info`
UNION SELECT MAX(LENGTH(`address`)) count FROM `student_info`
UNION SELECT MAX(LENGTH(`class`)) count FROM `student_info`
UNION SELECT MAX(LENGTH(`roll`)) count FROM `student_info`
UNION SELECT MAX(LENGTH(`subject`)) count FROM `student_info`)
FROM `student_info`
by using similar type of query i want to find one max value of string so i can manage table properly.
what is the proper query for SQLite?
>Solution :
Your query is mostly correct , just make minor change like below
SELECT MAX(count) from (
SELECT MAX(LENGTH(`name`)) count FROM `student_info`
UNION SELECT MAX(LENGTH(`address`)) count FROM `student_info`
UNION SELECT MAX(LENGTH(`class`)) count FROM `student_info`
UNION SELECT MAX(LENGTH(`roll`)) count FROM `student_info`
UNION SELECT MAX(LENGTH(`subject`)) count FROM `student_info`
) ;