CREATE TABLE IF NOT EXISTS test_table(
    --id INT PRIMARY KEY, 
    name varchar(10) NOT NULL CONSTRAINT dlina_name CHECK (char_length(name) between 4 and 10),                                 
    surname varchar,
    city varchar,
    age smallint CONSTRAINT positive_age CHECK (age > 0 and age<=150)
    );

insert into test_table (name, surname, city, age) 
values ('Aleksandr', 'Kolchin', 'Murmansk', 27), ('Dima', 'Ivanov', 'Moscow', 20), ('Petr', 'Sevanov', 'Omsk', 30), ('Oleg', 'Solop', 'Moscow', 25),
('Aleksandr', 'Bistrov', 'Kaliningrad', 22), ('Ivan', 'Kochev', 'Apatity', 33), ('Sergey', 'Sergeev', 'Piter', 25), ('Nikita', 'Korol', 'Voronezh', 25),
('Semen', 'Semenov', 'Yaroslavl', 26), ('Yaroslav', 'Vaneev', 'Kirov', 39), ('Oleg', 'Simonov', 'Moscow', 20), ('Nikita', 'Levin', 'Murmansk', 29),
('Sergey', 'Moiseev', 'Apatity', 19), ('Roman', 'Padorin', 'Orel', 32), ('Petr', 'Krychkov', 'Kandalaksha', 26), ('Stas', 'Kotin', 'Norilsk', 21),
('Boris', 'Kolyshkin', 'Polyarniy', 20), ('Konstantin', 'Lenin', 'Moscow', 25), ('Boris', 'Safonov', 'Severomorsk', 17), ('Ivan', 'Kolyshkin', 'Murmansk', 42);

