SELECT ASCII('iTalkbb') ---------- 105 |
SELECT char(105) 短信铃声怎么设置---------- i |
SELECT lower('iTalkbb'),upper('iTalkbb') ---------- ---------- italkbb ITALKBB |
SELECT lower('iTalkbb'),upper('iTalkbb') ---------- ---------- italkbb ITALKBB |
SELECT STR(123.45, 6, 1); ---------- 123.5 |
SELECT ltrim(' iTalkBB') ---------- 木字旁的字大全 iTalkBB |
SELECT rtrim('iTalkBB ') ---------- iTalkBB |
SELECT left('iTalkbb',2) ---------- iT |
SELECT RIGHT('iTalkbb',2) ---------- bb |
SELECT SUBSTRING('iTalkbb',2,4) ---------- Talk |
SELECT CHARINDEX('a','italkbb') ---------- 3 SELECT CHARINDEX('Hooyes’,’ ItalkBB') 蓝星花---------- 0 |
SELECT PATINDEX('AB%','1ABCD') ---------- 0 SELECT PATINDEX('%AB','1ABCD') ---------- 0 SELECT CHARINDEX('AB','1ABCD') ---------- 2 SELECT PATINDEX('%[B,C,0-9]%','XYZABC123') ---------- 5 |
SELECT QUOTENAME('iTalkbb') ---------- [iTalkbb] SELECT QUOTENAME('iTalkbb','<>') ---------- <iTalkbb> |
SELECT REPLICATE('iTalkBB',2) -------------- iTalkBBiTalkBB |
SELECT REVERSE('iTalkBB') ---------- BBklaTi |
SELECT REPLACE('iTalkBB','BB','MOBO') ---------- iTalkMOBO |
SELECT 'i'+SPACE(2)+'am' ---------- 女性保养 i am |
SELECT STUFF('',5,7,'mobo') ------------ 例1:查询信用卡的表,要求只显示前两位和后4位,中间用星号显示。生物的性状 SELECT STUFF(CREDIT_CARD,3,LEN(CREDIT_CARD)-6 ,REPLICATE('*',LEN(CREDIT_CARD)-6)) FROM ACCOUNT_CC ------------------ 40**********9900 40**********0130 40**********2623 例2:查询用户Email 要示Email只显示前1位和@后面的内容。 SELECT top 100 STUFF(EMAIL,2,charindex('@',EMAIL)-2,REPLICATE('*',charindex('@',EMAIL)-2)) from MEMBER order by acctid -------------------------- t***********@ c*******@ w*****@comcast t***@ a**********@ l***@gmu.edu y******@ b*******@ |
本文发布于:2023-07-04 14:37:05,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/fan/89/1067548.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |