SQL SERVER 常用命令
摘要:1、查询sql server 表 的 字段类型 :sp_help 表名 ;2、两个时间相减:select datediff(dd,‘2011/10/10’,'2011/10/12') from tab select (datediff(hh,starttime,endtime)-1)/24 + 1 from tb3、得到系统时间: Year(getdate()) --当前年 Month(getdate()) --当前月 Day(getdate()) --当前日4、字符串转换为时间:selectCONVERT(datetime, GETDATE());5、ROW_NUMBER()
阅读全文
posted @
2012-02-12 20:15
破浪loveJava
阅读(159)
推荐(0)