测试CREATE TABLE test_int2
来源:2-11 测试整型
AOSOUL
2020-09-04 03:23:45
视频显示插入成功
但是我这里显示超出范围,老师上课完全就是在放屁
mysql> CREATE TABLE test_int2( -> a tinyint(2), -> b smallint(2) -> ); Query OK, 0 rows affected (0.00 sec) mysql> DESC test_int2; +-------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------+------+-----+---------+-------+ | a | tinyint(2) | YES | | NULL | | | b | smallint(2) | YES | | NULL | | +-------+-------------+------+-----+---------+-------+ 2 rows in set (0.00 sec) mysql> INSERT test_int2(a,b) VALUES(123,45678); ERROR 1264 (22003): Out of range value for column 'b' at row 1 mysql> mysql>
1回答
同学你好,同学的问题已回复,建议同学参考上一个问答(https://class.imooc.com/course/qadetail/252372 )
祝学习愉快!
相似问题