Live2D

sql小知识点

1】sql去重复

select * from View where SfzId in
(select SfzId from View group by SfzId having count(1)<2)
View Code

 

2】sql替换字符串

--将2222.222中的.替换 为 1
replace('2222.222','.','1')
View Code

 

3】sql 找到指定的字符/字符串位置

SELECT PATINDEX('%.%','2222.111.221')
--输出结果 5   因为第一个.的下表是5
View Code

4】sql 类型转换

convert(int,A0225)=》把nvarchar转化为int

posted @ 2019-04-18 10:17  楚景然  阅读(141)  评论(0编辑  收藏  举报