Mysql get a table of maximum id to a variable

select @a: = MAX ( 'field name') AS 'alias' from 'table';
SELECT @a;

Guess you like

Origin www.cnblogs.com/lrzb/p/11819842.html
Recommended