Create Table Syntax Error

Database

Create Table Syntax Error

hi there.  I've never created a table using Teradata before.  I usually just query data instead.  Below is my first attempt at creating a table but I keep getting an error message of: CREATE TABLE Failed 3707: Syntax error, expected something like ',' between the 'int' keyword and '('.  I've looked on forums after forums on how to create a table in Teradata and what I have below seems to be correct.  Am I missing something?   Thanks in advance...

create table DACA

(COID int (3),

Acct int (20),

PC varchar (3),

"Class" int (1),

"Type" int (2),

effdate date,

expDate int (6),

St int (1),

Comments1 varchar (30),

Comments2 varchar (30),

Resn1 varchar (50),

Resn2 varchar (50))

primary index (acct);

2 REPLIES
Senior Apprentice

Re: Create Table Syntax Error

There's no display width for INT in Teradata, this looks like MySQL syntax.

Simply remove it (int (1) -> int), if it's actually less digits you might consider 1, 2, 4 or 8 byte integers: BYTEINT/SMALLINT/INT/BIGINT

Re: Create Table Syntax Error

Oh...didn't realize that.  I'm used to SQL and not all that comfortable with Teradata as there's tons of nuances between the two.  Thanks so dnoeth!