I have a table student with field student_id
:
S00254
N52145
FG0255
L30211
S20202
ERS4512
I need to get the result like 52145.
Actually my column student_id
mixed with character and number need to find
highest value among the rows.
I have a table student with field student_id
:
S00254
N52145
FG0255
L30211
S20202
ERS4512
I need to get the result like 52145.
Actually my column student_id
mixed with character and number need to find
highest value among the rows.
Assuming that every value in your column ends in a five digit number, then the following should work:
SELECT col
FROM yourTable
ORDER BY CAST(RIGHT(col, 5) AS UNSIGNED) DESC
LIMIT 1
VARCHAR maximum row size 65,535 bytes. It can be store 65,535 characters. learn more https://dev.mysql.com/doc/refman/5.7/en/column-count-limit.html
Mysql version 5.0.3 varchar can store maximum of 65,535 characters.
But again this limit is having limitation of maximum row size which is 65535 bytes. It means including all columns it should be less than 65,535 bytes.
Detailed blog: http://sforsuresh.in/mysql_varchar_max_length/