Mysql建表:
CREATE TABLE IF NOT EXISTS `java`(
`id` INT UNSIGNED AUTO_INCREMENT,
`ipv6` VARCHAr(100) NOT NULL,
`Messages` VARCHAr(40) NOT NULL,
PRIMARY KEY ( `id` )
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
//CREATE TABLE IF NOT EXISTS `java`(建一个名为java的表,表名先后必须加``)
//`id` INT UNSIGNED AUTO_INCREMENT,(新建项id,先后也必须加``)
//
`ipv6` VARCHAr(100) NOT NULL,
`Messages` VARCHAr(40) NOT NULL,(与前一样)
//
PRIMARY KEY ( `id` )
)ENGINE=InnoDB DEFAULT CHARSET=utf8;(设表数据为UTF-8编码)
//INSERT INTO java (id,ipv6,Messages) VALUES (1,'2001:0:2851:b9f0:8e5:af06:20af:9955','SB'); //INSERT INTO java (id,ipv6,Messages) (向java表id,ipv6,Messages,添加数据) VALUES
(1,'2001:0:2851:b9f0:8e5:af06:20af:9955','SB');(VALUES(1,'XXX','XXX')向对应的项添加数据,如1,'ji','ji1');(向id,ipv6,Messages,插入1,'ji','ji1')