oracle.rst
changeset 2243 eccc5846e1dd
parent 2231 2813a509381c
child 2244 7d8a914e06ee
equal deleted inserted replaced
2242:1921c2a985c9 2243:eccc5846e1dd
   503   select DBTIMEZONE from dual;
   503   select DBTIMEZONE from dual;
   504 
   504 
   505 Find time at timezone::
   505 Find time at timezone::
   506 
   506 
   507   select SYSTIMESTAMP at time zone 'GMT' from dual;
   507   select SYSTIMESTAMP at time zone 'GMT' from dual;
       
   508 
       
   509 Move data across DBes
       
   510 =====================
       
   511 
       
   512 Format ``select`` data as ``insert`` statements with ``/*insert*/`` hind (use ``F5`` key in Oracle
       
   513 developer)::
       
   514 
       
   515   select /*insert*/ * from tbl;
       
   516 
       
   517 Another useful hint::
       
   518 
       
   519   select /*csv*/ * from tbl;
       
   520 
       
   521 Alternatively enable output as ``insert`` statments (use ``F5`` key in Oracle developer)::
       
   522 
       
   523   set sqlformat insert;
       
   524   select * from tbl;
       
   525 
       
   526   spool /home/user/insert.sql;
       
   527   select * from tbl where ...;
       
   528   spool off;
       
   529