How To Write Query in Toad for Oracle?
You can write queries using SQL Editor in Toad for Oracle. Follow these steps:
Write Query in Toad for Oracle
- Open Toad and connect to the Oracle database.
- Then click on the menu Database > Editor.
- An SQL Editor window will open.
- Here you can write the SQL queries as you write in SQL*Plus.
- After completing the query press Ctrl+Enter or F9 to execute.
You can also format the SQL query in the Editor by pressing the Shift+Ctrl+F key combination or by clicking on the menu Edit > Format Code. Below is an example of a formatted SQL query:
SELECT EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE, JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID FROM hr.employees WHERE department_id = 90 AND manager_id = 100 ORDER BY employee_id;