SELECT dbms_lob.substr(dbms_metadata.get_ddl('INDEX', INDEX_NAME))||';' from dba_indexes where owner='需要导出所有索引的用户' refer to:https://www.cnblogs.com/lhrbest/p/8820438.html http://www.cnblogs.com/wlzhang/p/5035771.html
不多说,直接上干货 1.查询当前用户下表的创建语句 select dbms_metadata.get_ddl('TABLE','ux_future') from dual; 2.查询其他用户下表的创建语句 select dbms_metadata.get_ddl('TABLE','ux_future','Admin') from dual; 3.查询表的index select index_name,index_type,table_name from user_indexes where ta
oracle导出excel(非csv)的方法有两种,1.使用sqlplus spool,2.使用包体 现将网上相关代码整理后贴出以备不时之需: 使用sqlplus: 使用sqlplus需要两个文件:sql脚本文件和格式设置文件. 去除冗余信息,main.sql --main.sql 注意,需要在sqlplus下运行 非plsql命令行下 set markup html on entmap ON spool on preformat off spool test_tables.xls @get_