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

antlr_supported_sql.sqlserver.ddl.alter.xml Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<sql-cases db-types="SQLServer" namespace="sqlserver.ddl.alter">
    <sql-case id="alter_table" value="ALTER TABLE t_order REBUILD" />
    <sql-case id="alter_table_with_space" value="    ALTER TABLE
        t_order
    REBUILD    " />
    <sql-case id="alter_table_with_bracket" value="ALTER TABLE [t_order] REBUILD" />
    
    <sql-case id="alter_table_add_column" value="ALTER TABLE t_order ADD column4 VARCHAR(10)" />
    <sql-case id="alter_table_add_columns" value="ALTER TABLE t_order ADD column4 VARCHAR(10), column5 VARCHAR(10), column6 VARCHAR(10)" />
    <sql-case id="alter_table_modify_column" value="ALTER TABLE t_order ALTER COLUMN column4 VARCHAR(20)" />
    <sql-case id="alter_table_drop_column" value="ALTER TABLE t_order DROP COLUMN user_id" />
    <sql-case id="alter_table_drop_columns" value="ALTER TABLE t_order DROP COLUMN user_id, column5" />
    <sql-case id="alter_table_add_primary_key" value="ALTER TABLE t_order ADD CONSTRAINT pk_user_id PRIMARY KEY (user_id)" />
    <sql-case id="alter_table_add_composite_primary_key" value="ALTER TABLE t_order ADD CONSTRAINT pk_order_id_user_id_status PRIMARY KEY (order_id, user_id, status)" />
    
    <sql-case id="alter_table_add_unique_key" value="ALTER TABLE t_order ADD CONSTRAINT uk_order_id UNIQUE (order_id)" />
    <sql-case id="alter_table_add_foreign_key" value="ALTER TABLE t_order_item ADD CONSTRAINT fk_order_id FOREIGN KEY (order_id) REFERENCES t_order (order_id) ON UPDATE CASCADE ON DELETE CASCADE" />
    <sql-case id="alter_table_add_check" value="ALTER TABLE t_order ADD CHECK (order_id > 0)" />
    
    <sql-case id="alter_table_add_constraints" value="ALTER TABLE t_order_item ADD PRIMARY KEY (order_id), UNIQUE (order_id), CHECK (order_id > 0), FOREIGN KEY (order_id) REFERENCES t_order (order_id) ON UPDATE CASCADE ON DELETE CASCADE" />
    <sql-case id="alter_table_drop_constraint" value="ALTER TABLE t_order DROP CONSTRAINT pk_order_id" />
    <sql-case id="alter_table_drop_constraints" value="ALTER TABLE t_order DROP CONSTRAINT pk_order_id, uk_order_id, idx_order_id" />
     
    <sql-case id="alter_index" value="ALTER INDEX idx_order_id ON t_order REBUILD" />
    <sql-case id="alter_index_with_space" value="    ALTER INDEX
        idx_order_id
    ON
        t_order
    REBUILD    " />
    <sql-case id="alter_index_with_quota_bracket" value="ALTER INDEX [idx_order_id] ON [t_order] REBUILD" />
</sql-cases>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy