1.新建数据库
CREATE DATABASE 'db_Message';
2.创建数据表
代码
CREATE TABLE `db_Message`.`t_Message` (
`intMessageID` INT NOT NULL AUTO_INCREMENT COMMENT 'ID',
`strContent` VARCHAR( 500 ) NOT NULL COMMENT '留言内容',
PRIMARY KEY ( `intMessageID` )
) ENGINE = InnoDB;
`intMessageID` INT NOT NULL AUTO_INCREMENT COMMENT 'ID',
`strContent` VARCHAR( 500 ) NOT NULL COMMENT '留言内容',
PRIMARY KEY ( `intMessageID` )
) ENGINE = InnoDB;
3.插入数据
INSERT INTO `db_Message`.`t_Message` (`intMessageID`, `strContent`) VALUES (NULL, '1st Message');
4.批量插入数据
代码
REPLACE INTO uchome_config (var, datavalue) VALUES ('sitename', 'xx网'),('siteallurl', ''),('template', 'green'),('adminemail', 'webmaster@localhost:8080'),('timeoffset', '8'),('licensed', '0'),('debuginfo', '0'),('miibeian', ''),('headercharset', '0'),('allowrewrite', '0'),('onlinehold', '1800')