创建数据库
# 创建数据库
CREATE DATABASE `shop` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
# 授权用户 - root
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
# 授权用户 - Lidy
GRANT ALL PRIVILEGES ON *.* TO 'Lidy'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
# 刷新权限
FLUSH PRIVILEGES;
删除数据库
drop database shopxxb2c;
修改字段的值
update f_doc_relation set user_rongyun_id = null
where doc_id = 10;
添加字段
alter table f_doctor add cer_result_msg varchar(250) comment '失败原因';
修改字段
alter table t_code modify column code varchar(255);
修改decimal后面的小数点
ALTER TABLE `f_doctor`
MODIFY COLUMN `withdraw_integral_un` decimal(19,0) NULL DEFAULT NULL AFTER `pics_info_status`
删除字段
alter table f_doctor drop column Gatewayid
网友评论