日期:2014-05-18  浏览次数:20596 次

这一句如何改
SQL code

where @code like code+'[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'



1,有无更简洁的写法
2,后面的数字位数如不确定时,要怎样写

------解决方案--------------------
SQL code
where patindex('%[^0-9]%',@code)=0

------解决方案--------------------
探讨
SQL code
where patindex('%[^0-9]%',@code)=0

------解决方案--------------------
探讨
SQL code

where patindex('%[^0-9]%',@code)=0