Combining multiple statements

You can enter multiple statements into Interactive SQL; use a semicolon (;) to separate each statement.

StepsEntering multiple statements in SQL Statements pane

  1. Enter these commands into the SQL Statements pane.

    UPDATE Employees
    SET DepartmentID = 400,
        ManagerID = 1576
    WHERE EmployeeID = 467;
    
    UPDATE Employees
    SET DepartmentID = 400,
        ManagerID = 1576
    WHERE EmployeeID = 195;
    
    SELECT *
    FROM employees
    WHERE EmployeeID IN ( 195, 467 );
    
  2. On the toolbar, click Execute all SQL statement(s). All three statements are executed. After execution, the commands remain in the SQL Statements pane. To clear this pane, press the Esc key.