
mysql
哥来自东北
这个作者很懒,什么都没留下…
展开
-
mysql实现TOP N功能
利用MySQL中SELECT支持的一个子句——LIMIT——来完成这项功能。 LIMIT可以实现top N查询,也可以实现M至N(某一段)的记录查询,具体语法如下: SELECT * FROM MYTABLEORDER BY AFIELD LIMIT offset, recnum 其中offset为从第几条(M 1)记录开始,recnum为返回的记录条数。例: select ...2008-09-03 13:29:00 · 123 阅读 · 0 评论 -
MySQL Handling Duplicates
Tables or result sets sometimes contain duplicate records. Sometime it is allowed but sometime it is required to stop duplicate records. Sometime it is required to identify duplicate records and rem...原创 2009-10-18 12:14:14 · 163 阅读 · 0 评论