无效数字

id1为varchar2值为8,9 delete from s where a181 and b not in ( id1 ) 数据如下: idab 11818 21819 3181

id1为varchar2值为8,9
delete from s where a=181 and b not in ( id1 );
数据如下:
id  a  b
1  181  8
2  181  9
3  181  10
4  181  11
删除id为3,4的
是存储过程
报错是无效数字。这个怎么解决

------解决方法--------------------------------------------------------
delete from s where a=181 and b not in ( id1 );

红色部分应该换成具体的值

要不的话你就要用动态sql了