Dmitry Teslenko wrote: >> richardh=> SELECT * FROM chartbl WHERE c LIKE '111'; >> c >> --- >> (0 rows) >> >> richardh=> SELECT * FROM chartbl WHERE c LIKE '111 '; >> c >> ------------ >> 111 >> (1 row) >> >> richardh=> SELECT * FROM chartbl WHERE c LIKE '111%'; >> c >> ------------ >> 111 >> (1 row) >> > > '111%' would also match '1111' and '111anything', wouldn't it? Yes. I'm guessing what you actually want is varchar(10) rather than char(10) as a type. -- Richard Huxton Archonet Ltd -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general