将带有、号的字符串,以逗号分割,然后拼接为SQL语句的WHERE条件

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

string[] str = (sSpecialty).Split('、');
                sSpecialty = String.Join(",", str);
                sSpecialty = string.Format("{0}", sSpecialty.Replace(",", "' or specialty_name = '"));
                sSpecialty = " (specialty_name = '" + sSpecialty + "')";

转载于:https://my.oschina.net/u/2446847/blog/1536277

你可能感兴趣的:(将带有、号的字符串,以逗号分割,然后拼接为SQL语句的WHERE条件)