set pages 0
set long 9999999
set head off

spool /tmp/export-lesson.xml
select dbms_xmlgen.getxml('select * from lessons') from dual;
select dbms_xmlgen.getxml('select * from lesson_order') from dual;
spool off
