如何从sql中的数据中删除字符 [英] How do I remove a character from data in sql
本文介绍了如何从sql中的数据中删除字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我需要帮助删除数据表中输入的所有数据中的逗号(,)。
我可以一次完成吗?
我甚至无法想到一个可行的代码,而且我也无法冒险尝试有价值的数据。
请帮忙。谢谢。
Hello,
I need help removing a comma(,) in all data inputed in the data table.
Can I do it all at once?
I can't even think of a code that'll work, and I also can't risk experimenting with valuable data.
Please help. Thank you.
推荐答案
查看 REPLACE [ ^ ]功能< br $>
Look at the REPLACE [^]function
DECLARE @input NVARCHAR(20) = 'So, let us do this'
PRINT REPLACE(@input, ',', ' ')
是的我们可以。
我们只需要使用Query来更新表格..
就像这样..
Yes We can.
we just have to use Query to update the table..
like this..
update table_name set column_name=REPLACE(column_name,',','')
Use Static Method Replace() To replace The character value with null value.
这篇关于如何从sql中的数据中删除字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文