The WHERE clause and UPDATE statement are commonly used together. By using the WHERE clause in conjunction with the UPDATE statement, a user can specify only certain values that meet a certain criteria. The screen shot below will show how to use the WHERE clause in an UPDATE query.
The SQL statement in the SQL field:
UPDATE.PJDATA.EMPLOYEE SET SALARY = SALARY + 1000 WHERE WORKDEPT=?
The above statement is a simple SQL UPDATE query. The UPDATE command points to the location of the table. In this example the table is EMPLOYEE in the PJDATA schema. The SET command sets the salary to equal to the current salary and adds 1000. By using the WHERE statement the user can enter a specific work department; only employees in that department will receive raises. The question mark allows the user to enter any work department when this command is run.