mysql TIMESTAMP 不能为NULL
由于开发过程中一直使用oracle,而现在使用mysql开发时,遇到了一个小问题。
创建的一张表中,有一个字段类型是 TIMESTAMP ,我想将此字段设置为允许为NULL值的,但是总是失败,这个字段就是不能含有NULL值。
由于开发过程中一直使用oracle,而现在使用mysql开发时,遇到了一个小问题。
创建的一张表中,有一个字段类型是 TIMESTAMP ,我想将此字段设置为允许为NULL值的,但是总是失败,这个字段就是不能含有NULL值。
1、source命令 导入.sql文件时,中文乱码 或者是注释乱码
首先查看你的mysql数据库编码
如下命令
mysql> show variables like “character\_set\_database”;
+————————+——-+
| Variable_name | Value |
+————————+——-+
| character_set_database | utf8 |
+————————+——-+
1 row in set (0.00 sec)
http://dev.mysql.com/doc/refman/5.1/en/show-columns.html
The Key field indicates whether the column is indexed:
If Key is empty, the column either is not indexed or is indexed only as a secondary column in a multiple-column, non-unique index.
If Key is PRI, the column is a PRIMARY KEY or is one of the columns in a multiple-column PRIMARY KEY.
If Key is UNI, the column is the first column of a unique-valued index that cannot contain NULL values.
If Key is MUL, multiple occurrences of a given value are allowed within the column.
相信有朋友遇到过这个问题,特别是不是第一次安装mysql的朋友。
说明:我所说的都是在windowsXP系统下的mysql问题
问题描述一般是
“The security setting could not be applied to the database because the connection has
failed with the following error”
近期评论