In Toad for Oracle, follow these steps to generate insert statements script.
Steps to Generate Insert Statements Script in Toad for Oracle
- Open Toad for Oracle and connect to the database.
- In SQL editor, type your SQL query for which you want to generate INSERT script, for example, Select * from EMP or Select EMPNO, ENAME, SAL from EMP where DEPTNO = 20 and then press Ctrl+Enter to execute.
- Then you will get the result in the data grid window below.
- Then do the right click in the data grid window and from the shortcut menu choose Export Dataset option.
- In the Export Dataset window, choose Insert Statements option from the Export Format drop-down.
- Specify the file name in the File field to get the output in a file, or you can choose output to the Clipboard too.
- There are a lot of other checkboxes to choose options for your insert statement script. Select it as per your requirement.
- Then click on the OK button to generate the Insert statements script.