In DB2, you can create a duplicate table or copy an existing table to a new table with data or without data in many ways.
One way is to use db2look command. Using db2look command, you can create a table structure from an existing table with check constraints, default values and foreign keys, etc..
Let us start with the below example.
db2look -d sales -t ITEMMASTER -e > item.ddl
The above statement generates DDL Statements for the table ITEMMASTER in the file item.ddl
DDL statments includes create...