在ORCLA数据库中,用PL/SQL查询出了表数据,需要修改表中的一个数据,是个时间,‘yyyy-mm-dd 24h-mm-ss’,使用UPDATE 该如何的格式,如果不用UPDATE命令,又有什么办法?请指教!

解决方案 »

  1.   

    update tablename 
    set fldtime=to_date('2010-02-14 14:00:00','YYYY-MM-DD H24:MI:SS') 
    where .....
      

  2.   

    select * from tablename 
    where fieldname = '&parameter' 
    for update
      

  3.   

    没太懂楼主的意思:1、select * from tablename where ....for update
    手动修改之
    2、update tablename set colname=to_char(sydate,'YYYY-MM-DD HH12:MI:SS' ) where ...commit;
      

  4.   


    create table timetest
    (
     timetest date
    );insert into timetest select to_date('2010-01-01 10:11:12','yyyy-mm-dd hh24:mi:ss') from dual;
      

  5.   

    nsert into table 
    select to_date('2010-02-21 9:16:12','yyyy-mm-dd hh24:mi:ss') from dual;
      

  6.   

    insert into table 
    select to_date('2010-02-21 9:16:12','yyyy-mm-dd hh24:mi:ss') from dual;
      

  7.   

    update tablename set ...  where  colname=to_char(sydate,'YYYY-MM-DD HH12:MI:SS' )
      

  8.   

    在查询语句的最后面加上for update,查询出结果后点击查询列表上小工具栏上的锁图标按钮,然后就可以直接在列表里修改数据,修改完后点击打勾图标按钮保存修改,最后按工具栏的提交按钮(或者在菜单Session->Commit)