select * from A where len(id)=2select * from A where len(id)=4 and left(id,2)=参数
2、 select * from a where len(id)=2 and id like'11%'
select * from A where len(id)=2 select * from A where len(id)=4 and left(id,2)=参数
select * from tb where len(id)=2
select * from a where len(id)=2 and left(id,2)=@canshu
select * from A where len(id)=4 and left(id,2)=参数
select * from A where len(id)=2 select * from A where len(id)=4 and left(id,2)=参数拜托各位再帮忙把上面的两条sql写成个存储过程参数 是ID 我的ID是01,0101,010101这样的分3级 如果传进来的ID参数ID=01 就找到0101 如果是0101 就找到010101拜托了
select * from a where len(id)=2
select * from A where len(id)=2select * from A where len(id)=4 and left(id,2)=参数
select * from a where len(id)=2 and id like'11%'
select * from A where len(id)=2
select * from A where len(id)=4 and left(id,2)=参数
select * from A where len(id)=4 and left(id,2)=参数拜托各位再帮忙把上面的两条sql写成个存储过程参数 是ID
我的ID是01,0101,010101这样的分3级
如果传进来的ID参数ID=01 就找到0101 如果是0101 就找到010101拜托了