1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-05 15:41:14 +03:00
Files
mariadb-columnstore-engine/dbcon/ddlpackage/sql/examples/key-scenarios.sql
2016-01-06 14:08:59 -06:00

17 lines
376 B
SQL

-- These are called out as "key scenarios" in the alter table use case
-- Rename table
alter table t1 rename t2;
-- Change a column's name and type
alter table t2 modify a tinyint not null, change b c char(20);
-- Add a new column
alter table t2 add d datetime;
-- Add indexes
alter table t2 add index (d), add index (a);
-- Remove a column
alter table t2 drop column c;