一个表有字段a,为varchar2(20)类型,其内装的内容有三种类型,一种是10位整数,一种是4位整数,一种是空,我用 select count(*) from table where len(a) =10 得不到内容为10位整数的行数,用select count(*) from table where val(a) <10000 也得不到内容为4位整数的行数,我怎么才能如意呢?
调试欢乐多
应该是length()select count(*) from table where a <10000
去掉val()
select count(*) from table where a between 1000 and 10000; --4位整数
select count(*) from table where a is null; -- 为空