在T-SQL中我们经常批量操作时都会对字符串进行拆分,可是SQL Server中却没有自带Split函数,所以要自己来实现了.这里将字符串分割以table形式输出 语法如下: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /* create by shuke.li 2020-9-15 */ create function [dbo].[SplitString] ( @Input nvarchar(max), --input string to
/** * Delete any character in a given String. * @param inString the original String * @param charsToDelete a set of characters to delete. * E.g. "az\n" will delete 'a's, 'z's and new lines. * @return the resulting String */ public static String
将'0654879'替换成'0754879' UPDATE dbo.SG_Functionality SET FunctionalityCode=REPLACE(FunctionalityCode,'06','07') WHERE Type=2 AND FunctionalityCode LIKE '06%'