docs:mysql:mysql_postgres_comparison

MySQL / Postgres Comparison

MySQL:

SHOW TABLES

Postgres:

SELECT table_name FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY table_name

MySQL:

SHOW COLUMNS FROM tbl_name

Postgres:

SELECT column_name, udt_name, is_nullable, character_maximum_length
FROM information_schema.columns
WHERE table_name = 'tbl_name'

MySQL:

SELECT CONCAT(fname, ' ', lname) AS name FROM tbl_name

Postgres:

SELECT fname || ' ' || lname AS name FROM tbl_name
  • docs/mysql/mysql_postgres_comparison.txt
  • Last modified: 2008/08/03 00:25
  • by 127.0.0.1