sql中的字符串与数字判断的问题 各位大侠,我有一张表,里面的一列为字符串,当我在where条件里面写这一列等于数字1的时候报:ORA-01722 无效数字;但是当写这一列等于0时却不报错,可以查到记录,这张表中这列记录的值为字符串1和0两种值,请问这是怎么回事? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 with t as (select 1 id ,'1' name from dualunion all select 0 ,'0' from dual)--select * from t where name =1;select * from t where name =0; 没有楼主说的现象。。create table t(s1 varchar2(2));insert into t values ('1');insert into t values ('0');SQL> select * from t where s1=1; S1--1 SQL> select * from t where s1=0 2 ; S1--0 SQL> 32位的PLSQL登录64位的ORA11g问题 未找到关键字from VC++使用ODBC连接Oracle数据库 求cnoug邀请码! 找不到新建的表 oracle 数据库 查询 建立索引后为什么速度反而慢了?急! Oracle日期问题 同表关联,如何提交查询效率? 关于ORACLE的安装? 密码 建表后,用system查不到,求解。。 求助 有关ETL
select 1 id ,'1' name from dual
union all select 0 ,'0' from dual
)
--select * from t where name =1;
select * from t where name =0;
insert into t values ('1');
insert into t values ('0');
SQL> select * from t where s1=1;
S1
--
1
SQL> select * from t where s1=0
2 ;
S1
--
0
SQL>