SQL migration from MySQL to PostgreSQL: Difference between revisions

From annawiki
No edit summary
No edit summary
Line 1: Line 1:
==See also==
==See also==
# [[Postgresql vs Mysql]]
# [[Postgresql vs Mysql]]
# 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, in tango.info affected: gender field which had allowed values of 1,2,9 - as in ISO 5218 - and NULL
# 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,  
## in tango.info affected: gender field which had allowed values of 1,2,9 - as in ISO 5218 - and NULL


==SQL==
==SQL==

Revision as of 2022-11-18T15:01:04

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