mysql的alter table可用于增加和删除表的结构,还有非标准的change table old_column new_column type的改名语法。
modify的写法就比较简洁alter table modify column type not null 就可以改变列类型。
创建带分区的表:
create table t1{
id int,
year_col int
}
partition by range (year_col){
partition p0 values less than (1991),
partition p1 values less than (1995),
partition p2 values less than (1999)
};
用于将数据存储在表的中的分区,便于查询。(可mysql中说mysql5.1接受语法,但不实际执行)。。。