If the imie field is a char field, it will fill in everything you put into it, with spaces to reach the field length. If you change this to the varchar field, you can get rid of trailing spaces.
If you change your field to varchar, run UPDATE Osoby SET imie = RTRIM(imie) to trim extra spaces.
In fact, the request that you posted should work, it sounds somehow wrong with your data.
source share