xRobot
xRobot

Reputation: 26565

Convert Mysql query in Postgresql query

Is there an utility to convert mysql query in postgresql query ?

Upvotes: 13

Views: 21616

Answers (3)

pankaj jha
pankaj jha

Reputation: 61

Go to http://www.sqlines.com/online select left side mysql in source past your mysql query and select right side select postgresql in target then click left side on convert button

Upvotes: 5

Frank Heikens
Frank Heikens

Reputation: 127476

See also the PostgreSQL-wiki.

Upvotes: 2

halfdan
halfdan

Reputation: 34244

For DDL you can use mysqldump (see http://en.wikibooks.org/wiki/Converting_MySQL_to_PostgreSQL)

mysqldump --compatible=postgresql databasename > outputfile.sql

For DML I don't know of a tool that would automatically adjust queries from MySQL to PostgreSQL.

Upvotes: 8

Related Questions