On Monday 16 June 2003 16:58, Mihai RUSU wrote: > On 16 Jun 2003, razvan wrote: > > Au corectat asta de la 4.0.x . Cel putin asa stiu eu. > > Hmm.... > In testele mele s-a comportat la fel (campul era varchar). > > Anyway, pe PGSQL sau mai bine, pe ANSI SQL cum e ? Si daca e case > sensitive, cum faci sa fie case insesitive comparatia ? >
Incearca cu un test cu LIKE... In PgSQL exista ILIKE care e insesitive. ANSI spune: The key word ILIKE can be used instead of LIKE to make the match case insensitive according to the active locale. This is not in the SQL standard but is a PostgreSQL extension. De aici am putea deduce ca LIKE e case-sensitive (SQL Standard)... Dar... mysql> select * from a where t = 'aaa'; +------+------+ | id | t | +------+------+ | 1 | AAA | | 2 | aaa | +------+------+ 2 rows in set (0.04 sec) mysql> select * from a where t like 'aaa'; +------+------+ | id | t | +------+------+ | 1 | AAA | | 2 | aaa | +------+------+ 2 rows in set (0.00 sec) mysql> select * from a where t like 'AAA'; +------+------+ | id | t | +------+------+ | 1 | AAA | | 2 | aaa | +------+------+ 2 rows in set (0.00 sec) Mai multe la: http://developer.postgresql.org/docs/postgres/functions-matching.html -- Claudiu GPG Key: http://maya.cnixs.com/~claudiu/claudiu.gpg
