Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2013

    Unanswered: SQL Plus HELP PLEASE

    Ok so im new at this and I hope i posted in the right section but I am using Oracle SQL Plus and every time i try and create a table im getting the same error

    ERROR at line 3: ORA-00907: missing right parenthesis.

    I am not sure what I am doing wrong or if my statement is even written correctly can some one please HELP!!

    doctorID int (10) NOT NULL,
    LastName varchar(255) NOT NULL,
    PagerNumb int(10) NOT NULL,
    PRIMARY KEY (doctorID)

    CREATE TABLE Patient
    PatientNumb int(10) NOT NULL,
    SS int(9) NOT NULL,
    Name varchar(255) NOT NULL,
    dateOfBirth date(8) NOT NULL,
    address varchar NOT NULL,
    dateAdmited date(8) NOT NULL,
    clinic varchar(255) Not NULL,
    PRIMARY KEY (PatientNumb)

    CREATE TABLE Schedule
    doctorID int(10) FOREIGN KEY REFERENCES Doctor(doctorID )
    date int(8) FOREIGN KEY REFERENCES Doctor(doctorID )
    clinic varchar(255) FOREIGN KEY REFERENCES Patient(clinic )
    numberOfWorkHours int(2)

    CREATE TABLE Pat_Doc_Treatment
    Pat_Doc_TreatmentID int(10) NOT NULL,
    patientNumb int(10) FOREIGN KEY REFERENCES Patient(patientNumb)
    doctorID int(10) FOREIGN KEY REFERENCES Doctor(doctorID )
    treatmentCode int(10) FOREIGN KEY REFERENCES treatmentCode(Treatement)
    dateAdmited date(8) FOREIGN KEY REFERENCES Patient(patientNumb)
    comments varchar(255) Not NULL,
    PRIMARY KEY (PatientNumb)

  2. #2
    Join Date
    Sep 2009
    San Sebastian, Spain
    Remove all parenthesis where you have INT. So INT(10) should be just INT.
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    Follow me on Twitter

  3. #3
    Join Date
    Nov 2003
    Provided Answers: 23
    This is the wrong forum. MySQL is not the same as the Oracle database.
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags:

    Tips for good questions:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts