3
votes

I'm trying to create a table in SQL Developer but I get this error:

Error SQL: ORA-00972: Identifier too long

CREATE TABLE PACIENTE (
    IdentificacionID number(5),
    TipoIdentificacionID number(5),
    Nombre varchar(30),
    Apellido varchar(30),
    NumeroHistoriaClinica number(5),
    FechaNacimiento DATE,
    CiudadID number(5),
    SexoID number(5),
    EstadoCivilID number(5),
    OcupacionID number(5),
    NivelEscolaridadID number(5),
    EPSID number(5),
    IPSID number(5),
    Direccion varchar(30),
    Telefono number(10),
    AntecedentesFamiliares varchar(30),
    IndAntecedenteFamiliarTromboembolico varchar(1)
);

I tried to change the values of the varchar but it didn't work.

What is the problem?

2
Side note: use varchar2 instead of varchar. - Jeffrey Kemp

2 Answers

9
votes

You can not have greater than 30 characters for your identifier. Just a quick count looks like IndAntecedenteFamiliarTromboembolico is your offender. It is 36 characters long.

0
votes

Given the answer by #buzzsawddog, I would suggest you shorted your identifier name to something such as: IndAntcdntFmlrTrmbmblc (which will be around 22).