SQL migration from MySQL to PostgreSQL

From annawiki

See also

  1. PostgreSQL vs MySQL
  2. Database itself: automatic conversation (which tool?) : suspected: turned the type of some fields (select list?) into boolean, i.e. the type "select list" needs to be changed before or treated in another way,
    1. in tango.info affected: gender field which had allowed values of 1,2,9 - as in ISO 5218 - and NULL

SQL

LIKE to ILIKE

  1. change LIKE to ILIKE : LIKE is not case-sensitive in MySQL, but in PostgreSQL it is !! query will then return an error in MySQL

+0

https://tango.info/?q=Grandes+del+tango

MySQL: ORDER BY product_name +0,product_name

Grandes del tango 19 | y su orquesta Vol. 3
Grandes del tango 2 | y su orquesta
Grandes del tango 20 | Vol. 2

PostgreSQL: ORDER BY product_name

Grandes del tango 19 | y su orquesta Vol. 3
Grandes del tango 20 | Vol. 2	Alfredo De Angelis
Grandes del tango 21
Grandes del tango 29 | Francisco Canaro 2
Grandes del tango 2 | y su orquesta
Grandes del tango 30 | Angel Vargas 2