当前位置:Gxlcms > 数据库问题 > MySQL 时间

MySQL 时间

时间:2021-07-01 10:21:17 帮助过:18人阅读

owner from pet; select distinct owner from pet;

 

2.

CREATE TABLE t1 (year YEAR(4), month INT(2) UNSIGNED ZEROFILL,
    day INT(2) UNSIGNED ZEROFILL);
INSERT INTO t1 VALUES(2000,1,1),(2000,1,20),(2000,1,30),(2000,2,2),
    (2000,2,23),(2000,2,23);

year(4)

insert into time values(78);   #数据库中显示:1978
insert into time values(‘78‘); #数据库中显示:1978
insert into time values(‘1978‘); #数据库中显示:1978

UNSIGNED:

将数字类型无符号化,这与C和C++这些程序语言的unsigned含义相同。

INT的类型范围-2 147 483 648~2 147 483 647

INT UNSIGNED范围0~4 294 967 295

 

MySQL 时间

标签:distinct   code   blog   无符号   mon   数字   相同   div   into   

人气教程排行