Oracle恢复数据及修改日期格式方式

1,删除掉已经通过表B注入到表A中的所有数据。

(对于操作数据库,混乱插入后导致的表中数据混乱,而进行恢复数据表的一种简易操作。不必进行整体的数据库恢复手段。)

delete from A where chr_code in (SELECT chr_code FROM B);    

2,把Oracle日期格式为timestamp修改为常用date格式:

select to_char(cast(cast('23-7月 -18 07.49.32.000000 下午' as timestamp) as date), 'yyyy-mm-dd hh24:mi:ss') from dual;

3,查询数据表总记录数。

SELECT count(*) from   A  

猜你喜欢

转载自blog.csdn.net/CoderTnT/article/details/81173767
今日推荐