Home >Database >Mysql Tutorial >sqlserver字符串修改

sqlserver字符串修改

WBOY
WBOYOriginal
2016-06-07 15:39:371263browse

declare @level varchar(200) declare @level_1 varchar(200) set @level ='1|0#1#2#3' set @level_1='1|0#3' 修改字符串set @level='1|0#1#3''或者set @level='1|0#1#2#3,2|0#1' @level_1的值不變, 如果修改字符串set @level='1|0#1'則@level_1='1|0', 或

declare @level varchar(200)
declare @level_1 varchar(200)
set @level ='1|0#1#2#3'
set @level_1='1|0#3'

修改字符串set @level='1|0#1#3''或者set @level='1|0#1#2#3,2|0#1'

 @level_1的值不變,

如果修改字符串set @level='1|0#1'則@level_1='1|0',

  或者     set @level='2|0#1'則@level_1=''

 

即字符串二中的值必須是字符串一中有,如果字符串一沒有則字符串二沒有,但字符串一中有但字符二中不一定有

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn