mysql, string type id, obtaining a maximum value

Description, the id is a string, but the actual value is an integer, the maximum value acquired is:

select max(cast(id as SIGNED)) from table

 

Further, mysql generating a pseudo column:

SELECT @rownum:=@rownum+1 AS rownum, t.* FROM (SELECT @rownum:=0) r, ai_label_detail_t t

Guess you like

Origin www.cnblogs.com/gunduzi/p/12076452.html