Combining multiple statements

The Interactive SQL environment allows multiple statements to be entered at the same time. This can be done by ending each statement with a semi-colon (;).

StepsTo enter multiple statements in SQL Statements pane:

  1. Try entering the following three commands into the SQL Statements pane.

    UPDATE employee
    SET dept_id = 400,
        manager_id = 1576
    WHERE emp_id = 467;
    
    UPDATE employee
    SET dept_id = 400,
        manager_id = 1576
    WHERE emp_id = 195;
    
    SELECT *
    FROM employee
    WHERE emp_id IN ( 195, 467 );
    
  2. On the toolbar, click the Execute SQL Statement button. All three statements are executed. After execution, the commands remain in the SQL Statements pane. If you want to clear this pane, press the Esc key.