1. 数据库增删查改(手写)
因出现以下错误,开头需要设置 sql_mode,
表内容来自第二题自建表。
show variables like "sql_mode";
set sql_mode='';
set sql_mode='NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES';
INSERT INTO `member`(`name`,`gender`,`age`,`country`,`hometown`,`married`)VALUES('王二虎','male','29','China','Peking','Yes')
UPDATE `member` SET `name`='Mari',`gender`='female' WHERE `id`=1
//id加`没有影响
DELETE FROM `member` WHERE id=6
SELECT `name`,`hometown`,`id` FROM `member` WHERE id=2