我们经常需要使用到数据库里面的内置函数来操作数据库,我们下面就来讲一下我们常用的方法吧。
1、日期函数
datead向日期添加日期,datediff日期间隔,datapart返回日期对应的值,day当前几号,getdate()得到当前日期信息,getutcdate返回当前的utc日期,month得到月份,year得到年份。
2、字符串函数
ascii,char,charindex,difference,left,len,lower,lirim,nchar,patindex,replace,quotename,repalicate,reight,soundex,space,sir,stufe,substring,unicode,upper。
3、数学函数
abs,acos,asin,atan,atn2,ceiling,cos,cot,degrees,exp,floor,log,log10,pi,power,radians,rand,round,sign,square,sort
4、集合函数
count,min,max,sum,avg
如有不懂,联系独占网络(http://www.sz886.com)