有一个数据库的一列类型为long 我如何更新该行?
比如 表A
id  value 其中id为long
--update A set id=?(假设想让id=3如何写?) where id=2

解决方案 »

  1.   

    You can use LONG columns in UPDATE, INSERT, and (most) SELECT statements, but not in expressions, function calls, or SQL clauses such as WHERE, GROUP BY, and CONNECT BY. Only one LONG column is allowed in each database table and that column cannot be indexed.
      

  2.   

    SQL> 
    SQL> CREATE TABLE test
      2  (a LONG);
     
    Table created
     
    SQL> 
    SQL> INSERT INTO test
      2  SELECT 1 FROM dual;
     
    1 row inserted
     
    SQL> UPDATE test a SET a.a=2 ;
     
    1 row updated
     
    SQL> UPDATE test SET a=3 WHERE a=2;
     
    UPDATE test SET a=3 WHERE a=2
     
    ORA-00997: illegal use of LONG datatype
     
    SQL> 
      

  3.   

    long 类型不能用在where条件中