-- Create table create table ${tableName} ( <#list columnlist as clist> ${clist.columnName} ${clist.columnSQLType}<#if clist.columnSize?exists>${clist.columnSize}<#if clist.columnDefaults?exists && clist.columnDefaults != '' && clist.columnDefaults != 'null'> default ${clist.columnDefaults}<#if !clist.nullable> not null<#if clist_has_next>, ); <#if tableRemarks?exists> -- Add comments to the table comment on table ${tableName} is '${tableRemarks}'; -- Add comments to the columns <#list columnlist as clist> <#if clist.columnRemarks?exists && clist.columnRemarks != clist.columnName> comment on column ${tableName}.${clist.columnName} is '${clist.columnRemarks}'; <#if tablePk?exists> -- Create index CREATE UNIQUE INDEX PK_${tableName} ON ${tableName}(${tablePk}); ALTER TABLE ${tableName} ADD PRIMARY KEY (${tablePk}) USING INDEX PK_${tableName}; -- Create sequence create sequence SEQ_${tableName}<#if tableName?length lt 24>_PK minvalue 1 maxvalue 99999999999999999 start with 1 increment by 1 cache 20;