Reputation: 1588
I have the following character field in my model (against Oracle Database).
trans_status = models.CharField(max_length=10, blank=True, null=True)
Why does Django create this field as NVARCHAR2 instead of VARCHAR2? I mean,
Why
trans_status NVARCHAR2(10) NULL,
instead of
trans_status VARCHAR2(10) NULL,
What is the difference? How does Django decide on one and not the other?
Upvotes: 1
Views: 1060
Reputation: 3297
NVARCHAR2 will store the data with 16-bit characters, and VARCHAR2 will store the data with 8-bit characters. The difference that NVARCHAR2 will store unicode characters like Arabic characters, but it'll consume double size more than VARCHAR2.
Upvotes: 3