64
47

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MySQLとPostgresのデータ型対応表

Posted at

よく使うものを中心に。

:dolphin: MySQL :elephant: Postgres 容量
TINYINT - :dolphin: 1B
SMALLINT SMALLINT 2B
INT INT 4B
BIGINT BIGINT 8B
FLOAT NUMERIC 4B
DATE DATE :dolphin: 1000-01-01〜9999-12-31
:elephant: 4713-01-01 BC〜:9999-12-31
DATETIME - 1000-01-01 00:00:00〜9999-12-31 23:59:59
TIME TIME 00:00:00〜23:59:59
TIMESTAMP TIMESTAMP :dolphin: 1970-01-01 00:00:01〜2038-01-19 03:14:07
:elephant: 4713-01-01 00:00:00 BC〜9999-12-31 00:00:00
CHAR CHAR :dolphin: 255B
:elephant: 1GB
VARCHAR VARCHAR :dolphin: 65KB
:elephant: 1GB
TINYTEXT - :dolphin: 255B
TEXT TEXT :dolphin: 65KB
:elephant: 1GB
MEDIUMTEXT - :dolphin: 16MB
LONGTEXT - :dolphin: 4GB
64
47
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
64
47

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?