>>>>> DATABÁZE ---------------------------------------------------------- CREATE TABLE `studenti` ( `id` int, `jmeno` varchar(60), `prijmeni` varchar(60), `pohlavi` varchar(1), `PLAT` int, `datum_narozeni` date, `mesto` varchar(20), `fakulta` int ); insert into studenti values ('1', 'jana', 'krátka', 'f', '23500', '1954-12-22', 'Brno', '0'); insert into studenti values ('2', 'Jana', 'Nováková', 'F', '42261', '2016-11-11', 'Brno', '1'); insert into studenti values ('3', 'Sophia', 'Santiago', 'F', '20758', '1962-11-16', 'Brno', '8'); insert into studenti values ('4', 'Jarek', 'Benes', 'M', '52483', '2017-01-11', 'Praha', '8'); insert into studenti values ('5', 'Petr', 'Malý', 'M', '10000', '2001-09-23', 'Praha', '8'); insert into studenti values ('6', 'Honza', 'Adamec', 'M', '29990', '1977-07-27', 'Praha', '7'); insert into studenti values ('7', 'Petra', 'Adamcova', 'F', '23500', '1982-03-16', 'Olomouc', '6'); insert into studenti values ('8', 'Zuzka', 'Bezva', 'F', '39752', '2016-02-29', 'Ostrava', '7'); insert into studenti values ('9', 'Ivan', 'Sobota', 'M', '15274', '1900-02-01', 'Pardubice', '3'); insert into studenti values ('10', 'Petr', 'Novak', 'M', '27679', '2002-05-20', 'Zlin', '2'); insert into studenti values ('11', 'Jirka', 'Plavec', 'M', '23500', '2017-02-05', 'Opava', '1'); insert into studenti values ('12', 'Iva', 'Nováková', 'F', '25371', '2007-06-07', 'Opava', '0'); insert into studenti values ('14', 'Petr', 'Novak', 'M', '21072', '2011-06-15', 'Pardubice', '7'); insert into studenti values ('15', 'Iva', 'Nováková', 'F', '23181', '1994-02-13', 'Brno', '8'); --- INDEXY ----- tvorba tabulky create table studenti2 (`jmeno` varchar (50), `prezdivka` varchar(50), index (prezdivka)); create table studenti3 (`jmeno` varchar (50), `prezdivka` varchar(50), unique (prezdivka)); --- INDEXY ----- do hotové tabulky ALTER TABLE studenti add index (mesto); ALTER TABLE studenti add unique (id) --- INDEXY ----- smazat ALTER TABLE studenti drop index mesto; ALTER TABLE studenti drop index id;