nodejs怎么想mysql插入数据
1个回答
展开全部
建库并插入5条记录
Source Database : my_news_test
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for node_user
-- ----------------------------
DROP TABLE IF EXISTS `node_user`;
CREATE TABLE `node_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(30) DEFAULT NULL,
`age` int(8) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULTCHARSET=utf8;
-- ----------------------------
-- Records of node_user
-- ----------------------------
INSERT INTO `node_user` VALUES ('1', 'admin','32');
INSERT INTO `node_user` VALUES ('2', 'dans88','45');
INSERT INTO `node_user` VALUES ('3', '张三','35');
INSERT INTO `node_user` VALUES ('4', 'ABCDEF','88');
INSERT INTO `node_user` VALUES ('5', '李小二','65');
Source Database : my_news_test
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for node_user
-- ----------------------------
DROP TABLE IF EXISTS `node_user`;
CREATE TABLE `node_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(30) DEFAULT NULL,
`age` int(8) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULTCHARSET=utf8;
-- ----------------------------
-- Records of node_user
-- ----------------------------
INSERT INTO `node_user` VALUES ('1', 'admin','32');
INSERT INTO `node_user` VALUES ('2', 'dans88','45');
INSERT INTO `node_user` VALUES ('3', '张三','35');
INSERT INTO `node_user` VALUES ('4', 'ABCDEF','88');
INSERT INTO `node_user` VALUES ('5', '李小二','65');
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询