首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

函数解决方法

2011-12-26 
函数有没有什么函数可以去掉一个表中某列下的所有数据的最后一个字符啊?[解决办法]--更新Update TableName

函数
有没有什么函数可以去掉一个表中某列下的所有数据的最后一个字符啊?

[解决办法]

--更新
Update TableName Set ColName = Left(ColName, Len(ColName) - 1)
--查詢
Select Left(ColName, Len(ColName) - 1) As ColName From TableName
[解决办法]
1
update tb
set col = left(col,len(col)-1)
2
update tb
set col = substring(col,1,len(col)-1)
3
update tb
set col = stuff(col,len(col)-1,1, ' ')

热点排行