SQL语句汇总
来源:互联网 发布:服装行业数据分析 编辑:程序博客网 时间:2024/06/06 03:27
查看Oracle服务器端字符集
select * from nls_database_parameters;
查看Oracle客户端字符集
select * from nls_instance_parameters;
全库导出数据
exp 用户名/密码@远程的IP:端口/实例 file=存放的位置:\文件名称.dmplog=c:\orabackup\export.log full = y
导入数据
imp用户名/密码@远程的IP:端口/实例 file=存放的位置:\文件名称.dmplog=c:\orabackup\imp.log full=y
恢复Oracle数据
一:通过scn号恢复
select current_scn from v$database;(返回当前版本号)
select * from tablename as of scn XXX;(可继续缩小scn)
flashback table tablename to scn XXX;
二:通过时间戳恢复
select to_char(sysdate, 'yyyy-mm-dd hh24:mi:ss') from dual;
select * from tablename as of timestamp to_timestamp('2016-07-05 10:00:00','yyyy-mm-dd hh24:mi:ss');(可继续缩小范围)
flashback table tablename to timestamp to_timestamp('2016-07-05 10:00:00','yyyy-mm-dd hh24:mi:ss');
1. 复制表结构及其数据:
create table table_name_new as select * from table_name_old
2. 只复制表结构:
create table table_name_new as select * from table_name_old where 1=2;
create table table_name_new like table_name_old
添加数据:
insert into table_name_new select * from table_name_old
如果两个表结构不一样:
insert into table_name_new(column1,column2...) select column1,column2... from table_name_old
- SQL查询语句汇总
- sql查询语句汇总
- SQL 语句汇总
- SQL语句优化汇总
- SQL语句优化汇总
- SQL语句优化汇总
- SQL语句优化汇总
- Sql语句汇总【2】
- SQL语句技巧汇总
- SQL语句优化汇总
- SQL语句优化汇总
- SQL语句优化汇总
- 经典SQL语句汇总
- SQL语句汇总
- sql语句简单汇总
- sql语句汇总
- SQL语句自己汇总
- SQL 语句汇总(三)
- 常用正则表达式示例
- android studio 的 Error occurred during initialization of VM Could not reserve enough space fo 解决办法
- [LC 94 144 145]Binary Tree Traversal ( preorder, inorder,postorder)
- 数据结构复习——线性表的链式存储实现(单向链表)
- How to Submit an URB
- SQL语句汇总
- java-设计模式之桥模式
- Ubuntu apt-get命令
- iOS---防止UIButton重复点击的三种实现方式
- Redis - Windows下的安装
- 断点调试
- hadoop配置独立模式(Standalone Mode)
- Jquery带返回值的异步提交表单
- tensorflow示例代码注释5