문제

I am trying to move a table from SQL server to AWS Redshift. While trying to move NVARCHAR fields, I read that Redshift converts NVARCHAR to VARCHAR internally. So, a NVARCHAR(100) in SQL Server will be equivalent to VARCHAR(100) or Varchar(200) in Redshift ? If I want to define the NVARCHAR fields from SQLServer directly as VARCHAR in Redshift, do I need to double the length of fields?

도움이 되었습니까?

해결책

Got the answer from aws.

NCHAR and NVARCHAR types are converted to CHAR and VARCHAR types, respectively, and are stored in the specified number of bytes. A VARCHAR(120) column consists of a maximum of 120 single-byte characters, 60 two-byte characters, 40 three-byte characters, or 30 four-byte characters. So, if I am storing double-byte characaters in SQL using NVARCHAR(x), I can define VARCHAR(2x) in Redshift to have the same storage behavior. Following is the link for further reference: http://docs.aws.amazon.com/redshift/latest/dg/r_Character_types.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top