前提背景
现在我想把用户zkj下的所有表数据导出到excel中保存下来以方便查阅或者形成报表【环境为oracle10g】
步骤如下:
1,数据zkj下的表情况如下
2,在用户zkj下执行以下sql语句
set linesize 120
set pagesize 100
set feedback off
spool d:\exls\dish
select * from dish;
spool off;
spool d:\exls\consumer
select * from consumer;
spool off;
spool d:\exls\desk
select * from desk;
spool off;
spool d:\exls\orders
select * from orders;
spool off;
spool d:\exls\room
select * from room;
spool off;
spool d:\exls\orders_dish
select * from orders_dish;
spool off;
3,查看执行后的结果【保存的文件格式为*.lst,而且这里我没规整格式】
如此就变简单的完成了将用户的表数据导出