SQL like '%[^0-9]%' 以及{0}的含义

来源:互联网 发布:信息与数据的区别 编辑:程序博客网 时间:2024/06/07 23:44

{0}:

string.Format("select name,no from where idnum = {0}",你的值);
写法就等同于:

select name,no from where idnum =你的值

%表示任意字符,

[^]不在某范围内的字符

[^0-9]表示数字以外,
'%[^0-9]%‘连起来就是,含有数字以外字符的字符串

 

 

0 0