All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jp.co.tis.gsp.tools.db.template.sqlserver.createIndex.ftl Maven / Gradle / Ivy

Go to download

To automate the routine work of the DBA, it is a tool to be able to concentrate on the data modeling work.

There is a newer version: 5.0.0
Show newest version
<#-- SQL Server create index template -->
<#-- SQL Serverは主キーとユニークキーには自動でインデックが作成される。 -->
<#if index.isPrimaryKey()>
ALTER TABLE <#if entity.schema?has_content>${entity.schema}.${entity.name}
ADD CONSTRAINT ${index.name!} PRIMARY KEY
<#elseif index.type=1>
ALTER TABLE <#if entity.schema?has_content>${entity.schema}.${entity.name}
ADD CONSTRAINT ${index.name!} UNIQUE
<#elseif index.type=2 || index.type=3>
CREATE <#if index.type=2>UNIQUE INDEX ${index.name} ON <#if entity.schema?has_content>${entity.schema}.${entity.name}

(
<#foreach column in index.columnList>
  ${column.name}<#if column_has_next>,

);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy