Introduction to DB2 for z/OS
Previous topic | Next topic | Contents | Glossary | Contact z/OS | PDF


Delete statements

Introduction to DB2 for z/OS

You can use the DELETE statement to remove entire rows from a table.

The DELETE statement removes zero or more rows of a table, depending on how many rows satisfy the search condition that you specify in the WHERE clause. If you omit a WHERE clause from a DELETE statement, DB2® removes all rows from the table or view you name. Therefore, use the DELETE statement carefully. The DELETE statement does not remove specific columns from the row.

Consider this DELETE statement:

DELETE FROM NEWEMP
  WHERE EMPNO = '000060';

This DELETE statement deletes each row in the NEWEMP table that has employee number 000060.





Copyright IBM Corporation 1990, 2010