Do you mean
Quote:
|
Does any have a sql query that creates the ddl for creating a table and granting permissions, based on an existing table in an existing database?
|
If so, look at the "db2look" utility that comes with DB2. It will give you all the CREATE TABLE, VIEW, INDEX, PK, FK, TRIGGER, GRANT, ... statements to create a brand new (and empty) database.
Otherwise, if you want to create the tables and grants from scratch, look at the CREATE TABLE and GRANT statements.
You can find all this information in
DB2 infocenter site.