感謝原文博主https://blog.csdn.net/Hyo555/article/details/81943340
還有些經常用到的mysql語句
-- 新增表結構 DROP TABLE IF EXISTS `servicnn`; CREATE TABLE `servin` ( `id` int(11) NOT NULL AUTO_INCREMENT, `operation_unit` varchar(100) DEFAULT NULL COMMENT '運', `create_time` datetime DEFAULT NULL COMMENT '創間', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='數'; --新增表字段 ALTER TABLE risly ADD `lintype` varchar(255) DEFAULT NULL COMMENT '類型'; ALTER TABLE pply ADD `lipe` varchar(255) DEFAULT NULL COMMENT '類型'; --刪除表字段 ALTER TABLE risl_apply drop `lin_type`; ALTER TABLE ripply drop `linype`; --插入數據 INSERT INTO dblic(ste, ey, pde, me, cments, dea) VALUES ("ORKET", "5", "5", "核", "數階段", 2); --刪除數據 DELETE FROM dublic WHERE ste = "KET" AND pky = "5";
