这一句怎么改

这一句如何改SQL codewhere @code like code+[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]1,有无更简洁的

这一句如何改

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