摘要: GO /* 字符串分割函数 使用示例 select * from dbo.Func_StrSplit('x1,x2,x3,',',') */ create FUNCTION [dbo].[Func_StrSplit]( @Str nvarchar (max), -- 待处理字符串 @Split nv 阅读全文
posted @ 2020-12-01 20:11 温故纳新 阅读(568) 评论(0) 推荐(0) 编辑
摘要: sqlserver字符串的字符位置编号是从1开始的,与C#字符串中字符位置编号从0开始有区别 比如在sqlserver中字符串 'abcd' 位置编号依次为1,2,3,4 比如字符'c'的位置编号为3 left和right left:从指定字符串左边第一个位置开始取指定数量的字符 right:从指定 阅读全文
posted @ 2020-12-01 19:44 温故纳新 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 创建测试表 if OBJECT_ID('tempdb..#test') is not null drop table #test create table dbo.#test ( seqval int not null constraint pk_#seqval primary key ); ins 阅读全文
posted @ 2020-12-01 13:18 温故纳新 阅读(184) 评论(0) 推荐(0) 编辑