Search
 
SCRIPT & CODE EXAMPLE
 

SQL

data types mysql vs postgresql

MySQL                   PostgreSQL          SQLite

TINYINT                 SMALLINT            INTEGER
SMALLINT                SMALLINT
MEDIUMINT               INTEGER
BIGINT                  BIGINT
BIT                     BIT                 INTEGER
_______________________________________________________

TINYINT UNSIGNED        SMALLINT            INTEGER
SMALLINT UNSIGNED       INTEGER
MEDIUMINT UNSIGNED      INTEGER
INT UNSIGNED            BIGINT
BIGINT UNSIGNED         NUMERIC(20)
_______________________________________________________

DOUBLE                  DOUBLE PRECISION    REAL
FLOAT                   REAL                REAL
DECIMAL                 DECIMAL             REAL
NUMERIC                 NUMERIC             REAL
_______________________________________________________

BOOLEAN                 BOOLEAN             INTEGER
_______________________________________________________

DATE                    DATE                TEXT
TIME                    TIME
DATETIME                TIMESTAMP
_______________________________________________________

TIMESTAMP DEFAULT       TIMESTAMP DEFAULT   TEXT
NOW()                   NOW()   
_______________________________________________________

LONGTEXT                TEXT                TEXT
MEDIUMTEXT              TEXT                TEXT
BLOB                    BYTEA               BLOB
VARCHAR                 VARCHAR             TEXT
CHAR                    CHAR                TEXT
_______________________________________________________

columnname INT          columnname SERIAL   INTEGER PRIMARY 
AUTO_INCREMENT                              KEY AUTOINCREMENT
Comment

PREVIOUS NEXT
Code Example
Sql :: how to modify alter user root@localhost identified with mysql_native_password by properly 
Sql :: sql query to delete duplicate records 
Sql :: set up mssql in mac m1 
Sql :: how to print some string in mysql 
Sql :: drop specific row postgresql 
Sql :: sqlalchemy filter by relationship 
Sql :: fatal error uncaught mysqli_sql_exception 
Sql :: install mssql on ubuntu 
Sql :: how to print out column name differently in mysql 
Sql :: sql and operator 
Sql :: insert value to new table by joining 2 different tables 
Sql :: aggregate functions 
Sql :: asp.net core sql server stored procedure 
Sql :: join sql 
Sql :: quit mysql 
Sql :: between operator 
Sql :: enable mysql query log 
Sql :: sql logo 
Sql :: non relational database 
Sql :: mariadb errno 121 
Sql :: cronjob mysql backup 
Sql :: hallo 
Sql :: fonction stockée sql*plus 
Sql :: deduplicate delimited string bigquery 
Sql :: what does the -p flag do in mysql cli 
Sql :: value of sold product using having and group by in sql 
Sql :: mysql replication change database name 
Sql :: how to find shortest and longest name in sql 
Sql :: mysql select where field like in list 
Sql :: opensuse start MySQL 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =