Sql-Server

Netezza 6 到 SQL Server 2008 的表架構列數據類型等效項

  • May 25, 2017

將表架構遷移到 SQL Server 時,我試圖在 Netezza 中找到數據類型的等效數據類型。我在哪裡可以找到完整的清單?說到重點,我特別在尋找 Netezza 6 和 SQL Server 2008。

這是我們在 Netezza 中使用的數據類型的完整列表。顯然,其中一些取決於長度。

SELECT DISTINCT FORMAT_TYPE
FROM _v_relation_column


ABSTIME
BIGINT
BOOLEAN
BYTEA
BYTEINT
CHAR
CHARACTER VARYING(1)
CHARACTER VARYING(10)
CHARACTER VARYING(100)
CHARACTER VARYING(1000)
CHARACTER VARYING(10000)
CHARACTER VARYING(1024)
CHARACTER VARYING(108)
CHARACTER VARYING(11)
CHARACTER VARYING(110)
CHARACTER VARYING(1100)
CHARACTER VARYING(117)
CHARACTER VARYING(12)
CHARACTER VARYING(120)
CHARACTER VARYING(1200)
CHARACTER VARYING(128)
CHARACTER VARYING(13)
CHARACTER VARYING(14)
CHARACTER VARYING(140)
CHARACTER VARYING(15)
CHARACTER VARYING(150)
CHARACTER VARYING(1500)
CHARACTER VARYING(157)
CHARACTER VARYING(16)
CHARACTER VARYING(160)
CHARACTER VARYING(17)
CHARACTER VARYING(1700)
CHARACTER VARYING(18)
CHARACTER VARYING(1800)
CHARACTER VARYING(184)
CHARACTER VARYING(188)
CHARACTER VARYING(19)
CHARACTER VARYING(192)
CHARACTER VARYING(2)
CHARACTER VARYING(20)
CHARACTER VARYING(200)
CHARACTER VARYING(2000)
CHARACTER VARYING(201)
CHARACTER VARYING(2048)
CHARACTER VARYING(206)
CHARACTER VARYING(21)
CHARACTER VARYING(22)
CHARACTER VARYING(220)
CHARACTER VARYING(23)
CHARACTER VARYING(24)
CHARACTER VARYING(25)
CHARACTER VARYING(250)
CHARACTER VARYING(2500)
CHARACTER VARYING(254)
CHARACTER VARYING(255)
CHARACTER VARYING(256)
CHARACTER VARYING(26)
CHARACTER VARYING(27)
CHARACTER VARYING(28)
CHARACTER VARYING(3)
CHARACTER VARYING(30)
CHARACTER VARYING(300)
CHARACTER VARYING(31)
CHARACTER VARYING(32)
CHARACTER VARYING(33)
CHARACTER VARYING(35)
CHARACTER VARYING(350)
CHARACTER VARYING(37)
CHARACTER VARYING(38)
CHARACTER VARYING(4)
CHARACTER VARYING(40)
CHARACTER VARYING(400)
CHARACTER VARYING(4000)
CHARACTER VARYING(401)
CHARACTER VARYING(428)
CHARACTER VARYING(4282)
CHARACTER VARYING(450)
CHARACTER VARYING(46)
CHARACTER VARYING(5)
CHARACTER VARYING(50)
CHARACTER VARYING(500)
CHARACTER VARYING(5000)
CHARACTER VARYING(508)
CHARACTER VARYING(51)
CHARACTER VARYING(510)
CHARACTER VARYING(512)
CHARACTER VARYING(55)
CHARACTER VARYING(6)
CHARACTER VARYING(60)
CHARACTER VARYING(600)
CHARACTER VARYING(62)
CHARACTER VARYING(64)
CHARACTER VARYING(66)
CHARACTER VARYING(66046)
CHARACTER VARYING(7)
CHARACTER VARYING(70)
CHARACTER VARYING(700)
CHARACTER VARYING(75)
CHARACTER VARYING(77)
CHARACTER VARYING(79)
CHARACTER VARYING(8)
CHARACTER VARYING(80)
CHARACTER VARYING(800)
CHARACTER VARYING(8190)
CHARACTER VARYING(84)
CHARACTER VARYING(88)
CHARACTER VARYING(9)
CHARACTER VARYING(90)
CHARACTER VARYING(91)
CHARACTER VARYING(999)
CHARACTER(1)
CHARACTER(10)
CHARACTER(15)
CHARACTER(2)
CHARACTER(25)
CHARACTER(3)
CHARACTER(4)
CHARACTER(5)
CHARACTER(6)
CHARACTER(7)
CHARACTER(8)
DATE
DOUBLE PRECISION
INT2VECTOR
INTEGER
INTERVAL
NAME
NATIONAL CHARACTER VARYING(1)
NATIONAL CHARACTER VARYING(10)
NATIONAL CHARACTER VARYING(1024)
NATIONAL CHARACTER VARYING(16)
NATIONAL CHARACTER VARYING(16000)
NATIONAL CHARACTER VARYING(188)
NATIONAL CHARACTER VARYING(195)
NATIONAL CHARACTER VARYING(20)
NATIONAL CHARACTER VARYING(200)
NATIONAL CHARACTER VARYING(255)
NATIONAL CHARACTER VARYING(256)
NATIONAL CHARACTER VARYING(3)
NATIONAL CHARACTER VARYING(31)
NATIONAL CHARACTER VARYING(5)
NATIONAL CHARACTER VARYING(50)
NATIONAL CHARACTER VARYING(600)
NATIONAL CHARACTER VARYING(7)
NATIONAL CHARACTER VARYING(8)
NATIONAL CHARACTER VARYING(8192)
NUMERIC(1,0)
NUMERIC(10,0)
NUMERIC(10,2)
NUMERIC(10,3)
NUMERIC(10,4)
NUMERIC(11,0)
NUMERIC(12,0)
NUMERIC(12,2)
NUMERIC(12,3)
NUMERIC(12,8)
NUMERIC(13,3)
NUMERIC(14,0)
NUMERIC(15,0)
NUMERIC(16,15)
NUMERIC(17,2)
NUMERIC(18,0)
NUMERIC(18,1)
NUMERIC(18,10)
NUMERIC(18,2)
NUMERIC(18,3)
NUMERIC(18,4)
NUMERIC(18,5)
NUMERIC(18,6)
NUMERIC(2,0)
NUMERIC(2,1)
NUMERIC(20,0)
NUMERIC(20,10)
NUMERIC(20,8)
NUMERIC(25,24)
NUMERIC(28,0)
NUMERIC(28,2)
NUMERIC(3,0)
NUMERIC(3,1)
NUMERIC(34,6)
NUMERIC(38,0)
NUMERIC(38,10)
NUMERIC(38,2)
NUMERIC(38,20)
NUMERIC(38,4)
NUMERIC(38,6)
NUMERIC(38,8)
NUMERIC(4,0)
NUMERIC(5,0)
NUMERIC(5,2)
NUMERIC(6,2)
NUMERIC(7,2)
NUMERIC(7,3)
NUMERIC(8,0)
NUMERIC(8,2)
NUMERIC(9,3)
NUMERIC(9,4)
NUMERIC(9,6)
OID
OIDVECTOR
REAL
REGPROC
SMALLINT
TEXT
TIME
TIME WITH TIME ZONE
TIMESTAMP

我發現本指南適用於 Netezza 版本 5,因此應該很接近。該系統的文件很難找到,或者至少它不會輕易出現在 Google 上。對於 SQL Server 2008,MSDN 頁面在此處

ABSTIME --> ??
BIGINT --> bigint
BOOLEAN --> bit
BYTEA --> ?? tinyint?
BYTEINT --> smallint (tinyint is positive values only)
CHAR --> char(1)
CHARACTER VARYING(1..8000) --> varchar(1..8000)
CHARACTER VARYING(>8000) --> varchar(MAX)
CHARACTER(1..8000) --> char(1..8000)
DATE --> date
DOUBLE PRECISION --> double precision or float(53)
INT2VECTOR --> ??
INTEGER --> int
INTERVAL --> No equivalent
NAME --> ?? sysname?
NATIONAL CHARACTER VARYING(1..4000) --> nvarchar(1..4000)
NATIONAL CHARACTER VARYING(>4000) --> nvarchar(MAX)
NUMERIC(p,s) --> numeric(p,s)
OID --> ??
OIDVECTOR --> ??
REAL --> real
REGPROC --> ??
SMALLINT --> smallint
TEXT --> ?? Probably either varchar(MAX) or nvarchar(MAX)
TIME --> time(6)
TIME WITH TIME ZONE --> datetimeoffset(6)
TIMESTAMP --> datetime2(6)

引用自:https://dba.stackexchange.com/questions/27119