Home > Database > Mysql Tutorial > BLOB/TEXT column 'description' can't have a default value_MySQL

BLOB/TEXT column 'description' can't have a default value_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:44:01
Original
1783 people have browsed it

bitsCN.com MYSQL5.x在windows下是默认以‘strict mode’工作的,当建表语句中有类似:
description TEXT DEFAULT 'www.naozao.com'语句时,会给你一个错误或者警告信息
BLOB/TEXT column 'description' can't have a default value query
 
解决方法:
第一种. 去掉DEFAULT 'www.naozao.com'
第二种. 找到mysql安装根目录下的my.ini文件并注释掉sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION", 重启mysql
bitsCN.com

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Can Windows be learned?
From 1970-01-01 08:00:00
0
0
0
Install PHP in windows environment
From 1970-01-01 08:00:00
0
0
0
zookeeper extension under windows
From 1970-01-01 08:00:00
0
0
0
Can I play vim happily on Windows?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template