CREATE TABLE users(
id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(20) NOT NULL,
password VARCHAR(32) NOT NULL,
age TINYINT UNSIGNED NOT NULL DEFAULT '10',
sex BOOLEAN
);
DEFAULT '10'要加引号,不然有的版本报错
id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(20) NOT NULL,
password VARCHAR(32) NOT NULL,
age TINYINT UNSIGNED NOT NULL DEFAULT '10',
sex BOOLEAN
);
DEFAULT '10'要加引号,不然有的版本报错
2015-11-26
最新回答 / kklc
CREATE TABLE IF NOT EXISTS tdb_goods( goods_id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, goods_name VARCHAR(150) NOT NULL, goods_cate VARCHAR(40) NOT NULL, brand_name VARCHAR(40) NOT NULL, goods_price DECIMAL(15,3) UNSIGNED NOT...
2015-11-26
最新回答 / 小穆头
修改mysql root 密码:1.在服务上关闭mysql2.添加 skip—grant—tables 到 my.ini文件里3.dos启动mysql4.运行命令 mysql -uroot -p5.回车6.输入 use mysql7.输入 update user set password = password(“root”) where user = ”root“;8.输入 exit9.删除my.ini 文件里skip-grant-tables10.重新启动 mysql 数据库不用谢,还有不明白的可以问...
2015-11-26