The drop database order is utilized to expel your database from moment database index. It will erase every one of its items, table, spaces, compartments and related records.
db2 drop database <db_name>
Here, db_name determines the name of the database you need to erase.
How about we erase the database name "XYZ2" from the occasion.
Utilize the accompanying order:
db2 drop database XYZ2
Output:You can see the database XYZ2 is erased now by utilizing the accompanying order:
db2 list db directory