亚洲韩日午夜视频,欧美日韩在线精品一区二区三区,韩国超清无码一区二区三区,亚洲国产成人影院播放,久草新在线,在线看片AV色

您好,歡迎來到思海網(wǎng)絡(luò),我們將竭誠為您提供優(yōu)質(zhì)的服務(wù)! 誠征網(wǎng)絡(luò)推廣 | 網(wǎng)站備案 | 幫助中心 | 軟件下載 | 購買流程 | 付款方式 | 聯(lián)系我們 [ 會(huì)員登錄/注冊 ]
促銷推廣
客服中心
業(yè)務(wù)咨詢
有事點(diǎn)擊這里…  531199185
有事點(diǎn)擊這里…  61352289
點(diǎn)擊這里給我發(fā)消息  81721488
有事點(diǎn)擊這里…  376585780
有事點(diǎn)擊這里…  872642803
有事點(diǎn)擊這里…  459248018
有事點(diǎn)擊這里…  61352288
有事點(diǎn)擊這里…  380791050
技術(shù)支持
有事點(diǎn)擊這里…  714236853
有事點(diǎn)擊這里…  719304487
有事點(diǎn)擊這里…  1208894568
有事點(diǎn)擊這里…  61352289
在線客服
有事點(diǎn)擊這里…  531199185
有事點(diǎn)擊這里…  61352288
有事點(diǎn)擊這里…  983054746
有事點(diǎn)擊這里…  893984210
當(dāng)前位置:首頁 >> 技術(shù)文章 >> 文章瀏覽
技術(shù)文章

SQL Server基本函數(shù)詳細(xì)介紹

添加時(shí)間:2013-8-3 17:03:52  添加: 思海網(wǎng)絡(luò) 

1、字符串函數(shù)

  長度與分析用

  datalength(Char_expr) 返回字符串包含字符數(shù),但不包含后面的空格

  substring(expression,start,length) 不多說了,取子串

  right(char_expr,int_expr) 返回字符串右邊int_expr個(gè)字符

  字符操作類

  upper(char_expr) 轉(zhuǎn)為大寫

  lower(char_expr) 轉(zhuǎn)為小寫

  space(int_expr) 生成int_expr個(gè)空格

  replicate(char_expr,int_expr)復(fù)制字符串int_expr次

  reverse(char_expr) 反轉(zhuǎn)字符串

  stuff(char_expr1,start,length,char_expr2) 將字符串char_expr1中的從

  start開始的length個(gè)字符用char_expr2代替

  ltrim(char_expr) rtrim(char_expr) 取掉空格

  ascii(char) char(ascii) 兩函數(shù)對(duì)應(yīng),取ascii碼,根據(jù)ascii嗎取字符

  字符串查找

  charindex(char_expr,expression) 返回char_expr的起始位置

  patindex("%pattern%",expression) 返回指定模式的起始位置,否則為0

  2.數(shù)學(xué)函數(shù)

  abs(numeric_expr) 求絕對(duì)值

  ceiling(numeric_expr) 取大于等于指定值的最小整數(shù)

  exp(float_expr) 取指數(shù)

  floor(numeric_expr) 小于等于指定值得最大整數(shù)

  pi() 3.1415926.........

  power(numeric_expr,power) 返回power次方

  rand([int_expr]) 隨機(jī)數(shù)產(chǎn)生器

  round(numeric_expr,int_expr) 安int_expr規(guī)定的精度四舍五入

  sign(int_expr) 根據(jù)正數(shù),0,負(fù)數(shù),,返回+1,0,-1

  sqrt(float_expr) 平方根
3.日期函數(shù)

  getdate() 返回日期

  datename(datepart,date_expr) 返回名稱如 June

  datepart(datepart,date_expr) 取日期一部份

  datediff(datepart,date_expr1.dateexpr2) 日期差

  dateadd(datepart,number,date_expr) 返回日期加上 number

  上述函數(shù)中datepart的

  寫法 取值和意義

  yy 1753-9999 年份

  qq 1-4 刻

  mm 1-12 月

  dy 1-366 日

  dd 1-31 日

  wk 1-54 周

  dw 1-7 周幾

  hh 0-23 小時(shí)

  mi 0-59 分鐘

  ss 0-59 秒

  ms 0-999 毫秒

  日期轉(zhuǎn)換

  convert()

  4.系統(tǒng)函數(shù)

  suser_name() 用戶登錄名

  user_name() 用戶在數(shù)據(jù)庫中的名字

  user 用戶在數(shù)據(jù)庫中的名字

  show_role() 對(duì)當(dāng)前用戶起作用的規(guī)則

  db_name() 數(shù)據(jù)庫名

  object_name(obj_id) 數(shù)據(jù)庫對(duì)象名

  col_name(obj_id,col_id) 列名

  col_length(objname,colname) 列長度

  valid_name(char_expr) 是否是有效標(biāo)識(shí)符

關(guān)鍵字:數(shù)據(jù)庫、SQL Server、函數(shù)

分享到:

頂部 】 【 關(guān)閉
版權(quán)所有:佛山思海電腦網(wǎng)絡(luò)有限公司 ©1998-2024 All Rights Reserved.
聯(lián)系電話:(0757)22630313、22633833
中華人民共和國增值電信業(yè)務(wù)經(jīng)營許可證: 粵B1.B2-20030321 備案號(hào):粵B2-20030321-1
網(wǎng)站公安備案編號(hào):44060602000007 交互式欄目專項(xiàng)備案編號(hào):200303DD003  
察察 工商 網(wǎng)安 舉報(bào)有獎(jiǎng)  警警  手機(jī)打開網(wǎng)站