Následující kód slouží k vytvoření databázové tabulky s osobami (people) a vložení 50ti testovacích záznamů. Soubor stačí naimportovat do existující databáze (např. přes phpMyAdmin) nebo spustit příkazy přímo v SQL okně.
CREATE TABLE IF NOT EXISTS `people` (
`id` int(11) NOT NULL,
`firstName` varchar(128) NOT NULL,
`lastName` varchar(128) NOT NULL,
`email` varchar(255) NOT NULL,
PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO people (id, firstName, lastName, email) VALUES (1, 'Radek', 'Krůta', 'radek.kruta@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (2, 'Tomáš', 'Lorenc', 'tomas.lorenc@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (3, 'Milan', 'Hruda', 'milan.hruda@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (4, 'David', 'Kunz', 'david.kunz@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (5, 'Michal', 'Zedník', 'michal.zednik@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (6, 'Jaroslav', 'Zemek', 'jaroslav.zemek@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (7, 'Tomáš', 'Tomašík', 'tomas.tomasik@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (8, 'Radek', 'Veleba', 'radek.veleba@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (9, 'Radovan', 'Stupka', 'radovan.stupka@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (10, 'Jaroslav', 'Menčík', 'jaroslav.mencik@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (11, 'Miroslav', 'Malinka', 'miroslav.malinka@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (12, 'Lubomír', 'Látal', 'lubomir.latal@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (13, 'Tomáš', 'Kubala', 'tomas.kubala@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (14, 'David', 'Kalivoda', 'david.kalivoda@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (15, 'Tomáš', 'Janda', 'tomas.janda@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (16, 'Lubomír', 'Fuchs', 'lubomir.fuchs@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (17, 'Stanislav', 'Bartoš', 'stanislav.bartos@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (18, 'Svatopluk', 'Beneš', 'svatopluk.benes@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (19, 'Ondřej', 'Ambros', 'ondrej.ambros@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (20, 'Jaroslav', 'Čermák', 'jaroslav.cermak@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (21, 'Svatopluk', 'Dupal', 'svatopluk.dupal@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (22, 'Luděk', 'Housera', 'ludek.housera@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (23, 'Jiří', 'Kachyňa', 'jiri.kachyna@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (24, 'Jiří', 'Voženílek', 'jiri.vozenilek@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (25, 'Martin', 'Dobrovolný', 'martin.dobrovolny@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (26, 'Josef', 'Prachař', 'josef.prachar@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (27, 'Lucie', 'Houserová', 'lucie.houserova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (28, 'Markéta', 'Daňková', 'marketa.dankova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (29, 'Klára', 'Judexová', 'klara.judexova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (30, 'Kristýna', 'Kadlčíková', 'kristyna.kadlcikova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (31, 'Lada', 'Kanýzová', 'lada.kanyzova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (32, 'Lenka', 'Kocmanová', 'lenka.kocmanova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (33, 'Lenka', 'Kollariková', 'lenka.kollarikova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (34, 'Lenka', 'Kollmannová', 'lenka.kollmannova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (35, 'Lenka', 'Kovačková', 'lenka.kovackova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (36, 'Andrea', 'Kollmannová', 'andrea.kollmannova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (37, 'Lenka', 'Kozílková', 'lenka.kozilkova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (38, 'Lucie', 'Kyzlinková', 'lucie.kyzlinkova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (39, 'Lucie', 'Mácová', 'lucie.macova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (40, 'Eva', 'Doležalová', 'eva.dolezalova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (41, 'Ilona', 'Edinová', 'ilona.edinova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (42, 'Jana', 'Flochová', 'jana.flochova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (43, 'Jana', 'Formánková', 'jana.formankova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (44, 'Jana', 'Galiová', 'jana.galiova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (45, 'Kateřina', 'Hrdličková', 'katerina.hrdlickova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (46, 'Kateřina', 'Hrušková', 'katerina.hruskova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (47, 'Anežka', 'Mahlerová', 'anezka.mahlerova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (48, 'Marie', 'Modráčková', 'marie.modrackova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (49, 'Jiřina', 'Čermáková', 'jaroslava.cermakova@gmail.com');
INSERT INTO people (id, firstName, lastName, email) VALUES (50, 'Bohumila', 'Křesťanová', 'bohumila.krestanova@gmail.com');
Fiktivní data jsou volně k použití do testovacích aplikací apod. Na požádání můžu rozšířit o další tabulky nebo atributy.
Žádné komentáře. Buďte první :-)
Napsat komentář