Sunday, November 5, 2017

SQL Server and Postgres Datatypes

SQL Server Postgres
 bigint            numeric(20,0)                 
 binary            bytea                         
 bit               numeric(1,0)                  
 char              character(10)                 
 date              date                          
 datetime          timestamp without time zone   
 datetime2         timestamp(6) without time zone 
 datetimeoffset    timestamp(6) with time zone   
 decimal           numeric(18,0)                 
 float             double precision              
 geography         character varying(8000)       
 geometry          character varying(8000)       
 hierarchyid       character varying(8000)       
 image             bytea                         
 money             numeric(19,4)                 
 nchar             character(10)                 
 ntext             text                          
 numeric           numeric(18,0)                 
 nvarchar          character varying(10)         
 real              double precision              
 smalldatetime     timestamp without time zone   
 smallint          numeric(5,0)                  
 smallmoney        numeric(10,4)                 
 sql_variant       character varying(8000)       
 sysname           character varying(128)        
 text              text                          
 time              time(6) without time zone     
 timestamp         character varying(8000)       
 tinyint           numeric(5,0)                  
 uniqueidentifier   uuid                          
 varbinary         bytea                         
 varchar           character varying(10)         
 xml               xml                           

No comments:

Featured Post

SQL Server AWS Migration BCP

stored procedure to generate BCP scritps to migrate the SQL Server database. Developed this stored procedure on my labs to simulate the Mi...