Quote:
The SchemaExport Create Method
You will notice that the create method of the SchemaExport object takes two boolean parameters. The first boolean value indicates whether or not you want the generated database creation script to be printed out to the log file. The second parameter indicates whether you want the generated script to be executed against the underlying database. Passing two true values to the create method will cause the database generation scripts to be printed out to the log files, while also triggering the execution of the database creation scripts, which would mean dropping the existing tables in the database, and subsequently recreating them.
public void create(boolean script, boolean export)
Run the schema creation script.
Parameters:
script - print the DDL to the console
export - export the script to the database