1. TOP 表达式
SQL Server 2000的TOP是个固定值,是不是觉得差强人意,现在改进了。
--前n名的订单
declare @n int
set @n = 10
select TOP(@n) * from Orders
2. 分页
厦门网站建设(金龙网站设计工作室)推荐完美的DIV+CSS导航菜单 超越FLASH..不用js就将一个对象定位在页面底部并随页面..网页中实现IE常用菜单功能的按钮网页中实现浏览器的最大,最小化和关闭按钮仿微软风格的按钮演示<STYLE> .button2 { border-right:1px solid buttonhighlight; border-left:1px solid buttonshadow; border-bottom:1px solid buttonhighlight; border-top:1px solid buttonshadow } TD { cursor: hand; font-size: 9pt; font-family: 宋体; text-align: center; text-valign: middle } .handin { height:18px; width:2px; border-left:1px solid buttonshadow; border-right:1px solid buttonhighlight } .handout { height:18px; width:2px; border-left:1px solid buttonhighlight; border-right:1px solid buttonshadow; } .into { width:100%; border-right:1px solid buttonhighlight; border-left:1px solid buttonshadow; border-bottom:1px solid buttonhighlight; border-top:1px solid buttonshadow } .outto,.button1 { background-color: buttonface; background-repeat: repeat; background-attachment: scroll; border-left: 1px solid buttonhighlight; border-right: 1px solid buttonshadow; border-top: 1px solid buttonhighlight; border-bottom: 1px solid buttonshadow; background-position: 0%" } .button0 { } </STYLE><SCRIPT> function change_button(num) { if(event.srcElement.tagName=="TD"&&event.srcElement.value=="button") event.srcElement.className = "button"+num; } </SCRIPT><DIV class=into style="WIDTH: 100%; HEIGHT: 25px"><TABLE onmouseup=change_button(0) class=outto onmousedown=change_button(2) onmouseover=change_button(1) onmouseout=change_button(0) height=25 cellSpacing=1 width="100%" border=0><TBODY><TR><TD width="1%" height=19><SPAN class=handout></SPAN></TD><TD width="9%" height=19 value="button">按钮TD</TD><TD width="1%" height=19><SPAN class=handin></SPAN></TD><TD width="9%" height=19 value="button">按钮TD</TD><TD width="1%" height=19><SPAN class=handin></SPAN></TD><TD width="9%" height=19 value="button">按钮TD</TD><TD width="1%" height=19><SPAN class=handin></SPAN></TD><TD width="69%" height=19></TD></TR></TBODY></TABLE></DIV>