Mysql int类型字段插入表达式,值为0或1
作者:互联网
CREATE TABLE `t_user` (
`uId` INT(11) DEFAULT NULL,
`uName` VARCHAR(20) DEFAULT NULL,
`uPwd` VARCHAR(20) DEFAULT NULL,
`amt` INT(11) DEFAULT NULL
) ENGINE=INNODB DEFAULT CHARSET=utf8mb4
SELECT * FROM `t_user`;
INSERT INTO `dbunittest`.`t_user` (`uId`, `uName`, `uPwd`, `amt`)
VALUES
(11, 'uName', 'uPwd', 0=0) ;
INSERT INTO `dbunittest`.`t_user` (`uId`, `uName`, `uPwd`, `amt`)
VALUES
(12, 'uName', 'uPwd', 0=1) ;
标签:uName,int,值为,uPwd,DEFAULT,user,Mysql,NULL,amt 来源: https://www.cnblogs.com/oktokeep/p/13683178.html