diff options
Diffstat (limited to 'javascripts/libs/ddl_builder/templates/oracle.sql')
-rw-r--r-- | javascripts/libs/ddl_builder/templates/oracle.sql | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/javascripts/libs/ddl_builder/templates/oracle.sql b/javascripts/libs/ddl_builder/templates/oracle.sql new file mode 100644 index 0000000..8180cf0 --- /dev/null +++ b/javascripts/libs/ddl_builder/templates/oracle.sql @@ -0,0 +1,9 @@ +CREATE TABLE {{{tablePrefix}}}{{tableName}}{{{tableSuffix}}} + ({{#each_with_index columns}}{{#if index}}, {{/if}}{{{../fieldPrefix}}}{{name}}{{{../fieldSuffix}}} {{db_type}}{{/each_with_index}}) +{{separator}} + +INSERT ALL {{#each_with_index data}} + INTO {{{../tablePrefix}}}{{../tableName}}{{{../tableSuffix}}} ({{#each_with_index r}}{{#if index}}, {{/if}}{{{../../fieldPrefix}}}{{column_name_for_index ../..}}{{{../../fieldSuffix}}}{{/each_with_index}}) + VALUES ({{#each_with_index r}}{{#if index}}, {{/if}}{{formatted_field ../..}}{{/each_with_index}}){{/each_with_index}} +SELECT * FROM dual +{{separator}}
\ No newline at end of file |