Mysql之获取一个表的最大id到一个变量中

select @a:=MAX('字段名') AS '别名' from '表名 ';
select @a ;

posted @ 2019-11-08 14:02  乐蕊  阅读(1141)  评论(0)    收藏  举报