如何转换字符串字段并用于Where子句。
select * from student where (cast (nvl(linerevnum,'0') as int)) = 1
衬板是varchar2
例外:无效的数字
仅在数字时比较
select * from student where ( case when ISNUMERIC( linerevnum ) then cast (linerevnum as int) else null end ) = 1
或简单:
select * from student linerevnum = '1'