摘要:
http://www.webdiyer.com/download/show/29 阅读全文
摘要:
MIME-TypDateiendung(en)Bedeutungapplication/acad*.dwgAutoCAD-Dateien (nach NCSA)application/applefileAppleFile-Dateienapplication/astound*.asd *.asnAstound-Dateienapplication/dsptype*.tspTSP-Dateienapplication/dxf*.dxfAutoCAD-Dateien (nach CERN)application/futuresplash*.splFlash Futuresplash-Dateien 阅读全文
摘要:
1、命名参数Query q = sess.createQuery("from DomesticCat cat where cat.name = :name");q.setString("name", "Fritz");2、位置参数Query q = sess.createQuery("from DomesticCat cat where cat.name = ?");q.setString(0, "Izi");3、命名参数列表Query q = sess.createQuery("fr 阅读全文
摘要:
1. TOP 表达式 SQL Server 2000的TOP是个固定值,是不是觉得不爽,现在改进了。--前n名的订单declare@nint set@n=10 selectTOP(@n)*fromOrders2. 分页 不知各位过去用SQL Server 2000是怎么分页的,大多都用到了临时表。SQL Server 2005一句话就支持分页,性能据说也非常不错。--按Freight从小到大排序,求20到30行的结果 select*from( selectOrderId,Freight,ROW_NUMBER()OVER(orderbyFreight)asrowfromOrders )a whe 阅读全文
摘要:
基本原则:能用表变量就用表变量。实在不行才使用临时表。如与动态语句结合、外部需要使用等,就需要临时表。表变量主要开销系统的内存,而临时表则使用tempdb。对于小数据量的中间数据存储,可以使用表变量,而当需要临时保存的数据量很庞大时,建议使用临时表。具体使用表变量还是临时表,可以根据系统的运行状况来调整。declare@tbtable(idint,namevarchar(50),ageint)--创建表变量insert@tbselect1,'nn',14unionallselect1,'nn',14select*from@tbcreatetable#t(idin 阅读全文
摘要:
一、操作日期的函数:1. getdate()--获取当前系统日期、时间2. DateAdd (interval,number,date) --在向指定日期加上一段时间的基础上,返回新的 datetime 3.DateDiff (interval,date1,date2)--以interval 指定的方式,返回date2 与date1两个日期之间的差4. DatePart (interval,date) ---返回日期date中,interval指定部分所对应的整数值5. DateName (interval,date) --返回日期date中,interval指定部分所对应的字符串名称6. d 阅读全文