Reputation: 26565
Is there an utility to convert mysql query in postgresql query ?
Upvotes: 13
Views: 21616
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
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