sql 中的timestamp 类型  在oracle中有没有对应的数据类型

解决方案 »

  1.   

    oracle 也有timestamp这个类型啊
      

  2.   

    在 sql server 中, timestamp 类型列用于记录行上的更新操作,每次插入或更新行时会自动递增当前数据库的时间戳值,并填充到行的 timestamp 列中。在 oracle 中,与 timestamp 类型列类似的是 ora_rowscn 伪列,其反映每次插入或更新行操作对应的 scn。在查询时直接引用就可以(select ora_rowscn from tabname)。
      

  3.   

    ora_rowscn 已经测试,不是一个概念,并不随更新发生改变
      

  4.   


    有timestamp类型,可以显示成 格式 YYYY-MM-DD HH24:MI:SS
      

  5.   


    不会吧
    [code=SQ]
    SQL> create table emps as select employee_id,salary from employees;Table created.SQL> select employee_id,salary,ora_rowscn from emps where employee_id=197;EMPLOYEE_ID     SALARY ORA_ROWSCN
    ----------- ---------- ----------
            197       3100    2045995SQL> update emps set salary=salary*1.1 where employee_id=197;1 row updated.SQL> commit;Commit complete.SQL> select employee_id,salary,ora_rowscn from emps where employee_id=197;EMPLOYEE_ID     SALARY ORA_ROWSCN
    ----------- ---------- ----------
            197       3410    2046038[/code]