方法一: 使用TOP
SELECT TOP 1 * FROM user;
SELECT TOP 1 * FROM user order by id desc;
方法二: 使用LIMIT
SELECT * FROM user LIMIT 1;
SELECT * FROM user ORDER BY id ASC LIMIT 1;
SELECT * FROM user ORDER BY id DESC LIMIT 1;
---------------------
原文:https://blog.csdn.net/diyu122222/article/details/73250982