Команда для формирования набора данных без повторяющихся строк. Создание и заполнение таблиц с использованием визуального редактора БД Emma 0.6, страница 2

mysql> SELECT * FROM stud;

+--------+--------------+------+------------+-------------+

| idstud | fio          | pol  | dr         | spec_idspec |

+--------+--------------+------+------------+-------------+

|      2 | petrov       | m    | 1990-08-06 |           4 |

|      3 | abakumov     | m    | 1990-05-10 |           3 |

|      4 | habarova     | j    | 1989-06-10 |           3 |

|      5 | novikova     | j    | 1989-05-05 |           4 |

|      6 | tarasov      | m    | 1990-05-06 |           2 |

|      7 | udalov       | m    | 1990-07-08 |           2 |

|      9 | magadova     | j    | 1989-05-06 |           1 |

|     10 | pavlova      | j    | 1990-08-04 |           1 |

|     11 | sergeev      | m    | 1989-07-11 |           3 |

|     12 | taranova     | j    | 1990-08-12 |           3 |

|     13 | sineva       | j    | 1990-02-03 |           4 |

|     15 | ivanov       | m    | 1989-04-10 |           4 |

|     16 | cukerman     | m    | 1989-01-05 |           2 |

|     18 | zilbershtein | m    | 1990-04-08 |           2 |

|     19 | saharova     | j    | 1990-03-11 |           1 |

|     20 | smirnova     | j    | 1990-12-22 |           1 |

|     21 | nazarov      | m    | 1989-11-18 |           1 |

|     22 | sidorov      | m    | 1989-12-25 |           2 |

|     23 | obarin       | m    | 1990-11-30 |           3 |

|     24 | sherbakova   | j    | 1989-10-20 |           4 |

+--------+--------------+------+------------+-------------+

20 rows in set (0,00 sec)

mysql> select * from ekz;

+-------+--------+------------+-------------+-------------+

| idekz | ocenka | data       | stud_idstud | pred_idpred |

+-------+--------+------------+-------------+-------------+

|     6 |      5 | 0000-00-00 |           4 |           1 |

|     7 |      3 | 0000-00-00 |           4 |           2 |

|     9 |      5 | 0000-00-00 |           4 |           4 |

|    10 |      2 | 0000-00-00 |           3 |           2 |

|    11 |      4 | 0000-00-00 |           3 |           1 |

|    12 |      5 | 0000-00-00 |           3 |           4 |

|    13 |      5 | 0000-00-00 |           2 |           2 |

|    14 |      5 | 0000-00-00 |           2 |           3 |

|    15 |      4 | 0000-00-00 |           2 |           1 |

|    16 |      4 | 0000-00-00 |           5 |           2 |

|    17 |      4 | 0000-00-00 |           5 |           3 |

|    18 |      3 | 0000-00-00 |           5 |           1 |

|    19 |      3 | 0000-00-00 |           6 |           2 |

|    20 |      4 | 0000-00-00 |           6 |           1 |

|    21 |      5 | 0000-00-00 |           6 |           6 |

|    22 |      5 | 0000-00-00 |           6 |           7 |

|    23 |      4 | 0000-00-00 |           7 |           2 |

|    24 |      4 | 0000-00-00 |           7 |           1 |

|    25 |      5 | 0000-00-00 |           7 |           6 |

|    26 |      5 | 0000-00-00 |           7 |           7 |

|    27 |      4 | 0000-00-00 |           9 |           2 |

|    28 |      5 | 0000-00-00 |           9 |           1 |

|    29 |      4 | 0000-00-00 |           9 |           5 |

|    30 |      4 | 0000-00-00 |          10 |           2 |

|    31 |      5 | 0000-00-00 |          10 |           1 |

|    33 |      5 | 0000-00-00 |          10 |           5 |

|    35 |      4 | 0000-00-00 |          11 |           2 |

|    36 |      4 | 0000-00-00 |          11 |           1 |

|    37 |      5 | 0000-00-00 |          11 |           4 |

|    38 |      5 | 0000-00-00 |          12 |           2 |

|    39 |      5 | 0000-00-00 |          12 |           1 |

|    40 |      5 | 0000-00-00 |          12 |           4 |

|    41 |      4 | 0000-00-00 |          13 |           2 |

|    42 |      5 | 0000-00-00 |          13 |           3 |

|    43 |      3 | 0000-00-00 |          13 |           1 |

|    44 |      5 | 0000-00-00 |          15 |           2 |

|    45 |      5 | 0000-00-00 |          15 |           3 |

|    46 |      3 | 0000-00-00 |          15 |           1 |

|    47 |      4 | 0000-00-00 |          16 |           2 |

|    48 |      4 | 0000-00-00 |          16 |           1 |