T-SQL SUBSTRING(expression,starting-position int,length int)【原创】

mac2022-06-30  91

这个函数的作用就是对表达式expression进行从starting-position位置开始,截取length长度,然后返回截取后的字符串。

例如:select Users.UserName from Users where SUBSTRING(Users.UserName,1,1) != 'h'

这个语句的作用就是返回所有用户名不以h开头的记录。

转载于:https://www.cnblogs.com/ProgRamMer-cSdn/archive/2008/10/13/1309644.html

最新回复(0)