1. 程式人生 > >mysql 建立表字段Double型別長度

mysql 建立表字段Double型別長度

mysql> create table MyClass(
    > id int(4) not null primary key auto_increment,
    > name char(20) not null,
    > sex int(4) not null default '0',

    > degree double(16,2));

double(16,2) 16位長度,小數點後2位。