字符型用select * from table_1 where  c1='1234';
在行了。好端端的,没有必要使用不规范的格式。

解决方案 »

  1.   

    尽量不要使用隐式转换。
    select * from table_1 where c1=to_char('1234');
      

  2.   

    是不是应该这样写:
    select * from table_1 where to_char(c1)=1234;
      

  3.   

    不是,to_char是转换成为字符型的。
    上面的to_char(c1)没有意义,因为c1本来就是 字符型。
    我上面的不应该加',select * from table_1 where c1=to_char(1234);
      

  4.   

    错了,是不是应该这样写:
    select * from table_1 where to_number(c1)=1234;