0

I have a column in oracle table of data type as varchar2. I am re-creating the same table in Teradata. what should the datatype in Teradata be for this column? Will it be varchar() ? Any help is greatly appreciated. Thanks in advance!

user3903418
  • 143
  • 1
  • 1
  • 11
  • 2
    The answer is `varchar()`, the standard SQL type for strings. – Gordon Linoff Dec 07 '20 at 18:06
  • 1
    VARCHAR(n) and check the character set: `VARCHAR(n) CHARACTER SET LATIN|UNICODE` – dnoeth Dec 07 '20 at 18:48
  • @GordonLinoff thanks for the quick answer, if I declared the column's data type as varchar() , how many characters can I input against that column. Google search shows that we have to declare like VARCHAR(X) where X -> 1-64000. So do I need to calculate the maximum length of values that the column can take and substitute X with it ? .For ex: if my columns values can have a maximum length of 25, do i need to declare the datatype as VARCHAR(25) ? This is very different from Oracle, where we just declare it as VARCHAR2, hence the confusion I am having – user3903418 Dec 08 '20 at 05:05
  • 1
    @user3903418 . . . Actually not. You need the maximum length for `varchar2()` in Oracle as well. However, the length is limited to 4000 characters (bytes). – Gordon Linoff Dec 08 '20 at 11:36

0 Answers0