SQL migration from MySQL to PostgreSQL: Difference between revisions

From annawiki
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
==See also==
# [[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
==SQL==
===LIKE to ILIKE===
#change LIKE to ILIKE : LIKE is not case-sensitive in MySQL, but in PostgreSQL it is !! query will then return an error in MySQL
#change LIKE to ILIKE : LIKE is not case-sensitive in MySQL, but in PostgreSQL it is !! query will then return an error in MySQL
#see also [[Postgresql vs 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

Latest revision as of 2022-11-18T15:03:01

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