You will be asked to provide a name for your table
DELETE FROM TABLE_NAME
[WHERE CONDITION];
Even if the WHERE clause is an optional part, you are required to include it when you want to delete selected rows of data from a certain table. Without the WHERE clause, you will be removing all the records from the table.
To demonstrate the function of the DELETE statement, you will create a copy of the Customer_TBL table first. In this way, you will still be able keep the original table to be used for further exercises.
Go to the DATABASE NAVIGATOR then right-click on Customer_TBL. Choose CREATE A SIMILAR TABLE.
You will be asked to provide a name for your table. Type Customer_TBL2 inside the TABLE NAME input box.
Click on the COMMIT STRUCTURE CHANGES button under the STRUCTURE tab. You will get the screen below.
Click on the OK button and a new Customer_TBL2 table will be created. This will be the table that you will work around to demonstrate the DELETE command.
At this point in time Customer_TBL2 table is empty, so you have to copy the records from Customer_TBL table. To do this, follow the steps below:
Click the option then click the REFRESH TABLE DATA button or press F5 on your keyboard. This will ensure that your data in the database table is updated.