日期:2014-05-16  浏览次数:20578 次

推荐一个网址generatedata

若是觉得做test时没有data,呵呵,这有一个不错的网址哦,也许能够帮上忙~

http://www.generatedata.com

?

下面是一个生成SQL数据的小demo:

CREATE TABLE t1 (
??`id` mediumint(8) unsigned NOT NULL auto_increment, 
??`id` MEDIUMINT default NULL,
??`name` TEXT default NULL,
??PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1; 



INSERT INTO `t1` (`id`,`name`) VALUES ('1','massa. Vestibulum accumsan neque');
INSERT INTO `t1` (`id`,`name`) VALUES ('2','Nulla eu neque pellentesque massa lobortis ultrices. Vivamus rhoncus. Donec');
INSERT INTO `t1` (`id`,`name`) VALUES ('3','tempus non, lacinia at, iaculis quis, pede. Praesent');
INSERT INTO `t1` (`id`,`name`) VALUES ('4','eget magna. Suspendisse tristique');
INSERT INTO `t1` (`id`,`name`) VALUES ('5','Nunc mauris elit, dictum eu,');
INSERT INTO `t1` (`id`,`name`) VALUES ('6','primis in faucibus orci luctus et ultrices posuere cubilia Curae;');
INSERT INTO `t1` (`id`,`name`) VALUES ('7','nulla vulputate dui, nec tempus mauris erat');
INSERT INTO `t1` (`id`,`name`) VALUES ('8','magna a neque. Nullam ut nisi a');
INSERT INTO `t1` (`id`,`name`) VALUES ('9','ultrices posuere cubilia Curae;');
INSERT INTO `t1` (`id`,`name`) VALUES ('10','Sed eu nibh vulputate mauris');
INSERT INTO `t1` (`id`,`name`) VALUES ('11','Nulla interdum. Curabitur');
INSERT INTO `t1` (`id`,`name`) VALUES ('12','velit.');
INSERT INTO `t1` (`id`,`name`) VALUES ('13','natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.');
INSERT INTO `t1` (`id`,`name`) VALUES ('14','eget metus eu');
INSERT INTO `t1` (`id`,`name`) VALUES ('15','Morbi vehicula. Pellentesque tincidunt tempus');
INSERT INTO `t1` (`id`,`name`) VALUES ('16','Donec luctus aliquet odio. Etiam ligula tortor, dictum eu,');
INSERT INTO `t1` (`id`,`name`) VALUES ('17','mi eleifend');
INSERT INTO `t1` (`id`,`name`) VALUES ('18','gravida mauris ut mi. Duis');
INSERT INTO `t1` (`id`,`name`) VALUES ('19','eu sem. Pellentesque ut ipsum');
INSERT INTO `t1` (`id`,`name`) VALUES ('20','diam nunc, ullamcorper eu, euismod ac, fermentum');
INSERT INTO `t1` (`id`,`name`) VALUES ('21','tincidunt orci quis lectus. Nullam suscipit, est ac facilisis facilisis,');
INSERT INTO `t1` (`id`,`name`) VALUES ('22','dis parturient montes, nascetur ridiculus mus. Donec');
INSERT INTO `t1` (`id`,`name`) VALUES ('23','ligula. Nullam feugiat placerat');
INSERT INTO `t1` (`id`,`name`) VALUES ('24','arcu. Vestibulum ante ipsum primis in faucibus orci');
INSERT INTO `t1` (`id`,`name`) VALUES ('25','ac ipsum.');
INSERT INTO `t1` (`id`,`name`) VALUES ('26','quam a felis');
INSERT INTO `t1` (`id`,`name`) VALUES ('27','tellus. Nunc lectus pede,');
INSERT INTO `t1` (`id`,`name`) VALUES ('28','volutpat ornare, facilisis eget, ipsum. Donec sollicitudin');
INSERT INTO `t1` (`id`,`name`) VALUES ('29','ipsum. Curabitur consequat, lectus sit amet luctus');
INSERT INTO `t1` (`id`,`name`) VALUES ('30','augue scelerisque mollis. Phasellus');
INSERT INTO `t1` (`id`,`name`) VALUES ('31','at, velit.');
INSERT INTO `t1` (`id`,`name`) VALUES ('32','viverra. Maecenas iaculis aliquet diam. Sed diam lorem, auctor');
INSERT INTO `t1` (`id`,`name`) VALUES ('33','ornare');
INSERT INTO `t1` (`id`,`name`) VALUES ('34','euismod enim. Etiam gravida');
INSERT INTO `t1` (`id`,`name`) VALUES ('35','fermentum vel,');
INSERT INTO `t1` (`id`,`name`) VALUES ('36','ullamcorper magna. Sed eu eros.');
INSERT INTO `t1` (`id`,`name`) VALUES ('37','est, congue a, aliquet vel, vulputate');
INSERT INTO `t1` (`id`,`name`) VALUES ('38','vulputate, nisi sem semper erat, in consectetuer ipsum');
INSERT INTO `t1` (`id`,`name`) VALUES ('39','Proin sed turpis nec mauris blandit');
INSERT INTO `t1` (`id`,`name`) VALUES ('40','lorem fringilla ornare placerat, orci lacus vestibulum');
INSERT INTO `t1` (`id`,`name`) VALUES ('41','risus. Quisque libero lacus, varius et, euismod et,');
INSERT INTO `t1` (`id`,`name`) VALUES ('42','Donec');
INSERT INTO `t1` (`id`,`name`) VALUES ('43','faucibu