DISTINCT
关键字。DISTINCT
关键字。ORDER BY
子句结合 LIMIT
或 TOP
关键字。,,``sql,SELECT * FROM table_name ORDER BY id DESC LIMIT 1;,
`,,或者在 Microsoft SQL Server 中使用:,,
`sql,SELECT TOP 1 * FROM table_name ORDER BY id DESC;,
``,,这样就可以获取表中的最后一条记录。Powered By Z-BlogPHP 1.7.3