mysql:
select * from table order by id DESC limit 1
oracle:
select * from emp where id in (select max(id) from emp);
实例
[Actionscript3] 纯文本查看 复制代码 mysql> use weifeng;
Database changed
mysql> select * from tb_post order by id desc limit 1
*************************** 1. row ***************************
id: 24897419
bloggerId: 287172
likeNum: 52
postTime: 2016-03-24 16:01:07
spiderFetchTime: NULL
postRank: NULL
showId: NULL
platformId: 1
postPlatformId: 1_b1d88acb5e5a21ed70785c41f3d5fe25
sourcePostId: NULL
mediaUrl: [url=http://www.gphabit.com/]http://www.gphabit.com/[/url]
width: 1080
height: 809
fileSize: 245829
averageHue: 0x4f4838
mediaType: 0
textContent: Senior Camp 2016 |