摘要:
----TodaySELECT GETDATE() 'Today'----YesterdaySELECT DATEADD(d,-1,GETDATE()) 'Yesterday'----First Day of Current WeekSELECT DATEADD(wk,DATEDIFF(wk,0,GETDATE()),0) 'First Day of Current Week'----Last Day of Current WeekSELECT DATEADD(wk,DATEDIFF(wk,0,GETDATE()),6) 'Last Da 阅读全文
摘要:
2008使用%%physloc%%这个没有文档化的功能可以去掉数据库中重复的行。An easy way to remove duplicate rows from a table in SQL Server 2008 is to use undocumented feature called %%physloc%%. This pseudo column shows the physical location of a row. 注意这个功能没有在文档中记录,所以你使用的时候要自己承担风险Note that this feature is undocumented and unsupporte 阅读全文