Reputation: 12890
When I try to execute the SQL statment below in Oracle SQL Developer:
CREATE TABLE Nrom1Tab ( Sig TEXT NOT NULL PRIMARY KEY,
DocSubject TEXT,
DocClassification TEXT,
DepName VARCHAR,
OrgName TEXT,
FromInf TEXT,
ToInf TEXT,
DateInf TEXT,
NoteInf TEXT );
It shows this error:
Upvotes: 0
Views: 661
Reputation: 5231
I believe the error complaining about missing a left parenthesis, is angry that VARCHAR doesn't have a length defined. The error references column 113, which would be where the left parenthesis should be, the 114th character on that line.
Justin also correctly points out TEXT is not a valid datatype. While I don't think that is causing the error you're seeing, it'll be an error very soon :)
Upvotes: 2
Reputation: 231651
I'm not sure what the error message is, however
TEXT
is not a valid data type in Oracle.VARCHAR
is a valid data type but you would need to specify the length (i.e. VARCHAR(10)
) would allow up to 10 bytes of storage (assuming a default NLS_LENGTH_SEMANTICS
of BYTE
). It would generally be preferred to use the VARCHAR2
data type rather than VARCHAR
as well.Upvotes: 5
Reputation: 25337
CREATE TABLE Nrom1Tab
(
Sig TEXT PRIMARY KEY, DocSubject TEXT, DocClassification TEXT,
DepName VARCHAR(100), -- Missing LENGTH
OrgName TEXT, FromInf TEXT, ToInf TEXT, DateInf TEXT, NoteInf TEXT );
Upvotes: 1