ORA-00922:Missing or invalid option

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TiaTia
    New Member
    • Jul 2010
    • 2

    #1

    ORA-00922:Missing or invalid option

    I constantly am receiving this message when I run this script. Can anyone tell me what I am doing wrong?


    CREATE TABLE Pathogen(s)
    PathogenID VARCHAR(50),

    Viral VARCHAR(50)CONS TRAINT ViralRequired NOT NULL,

    Bacterial VARCHAR(50)CONS TRAINTBacterial Required NOT NULL,

    Fungal VARCHAR(50)CONS TRAINTFungalReq uired NOT NULL,

    CONSTRAINT PKPathogen(s) PRIMARY KEY (PathogenID))
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    You can't have special characters (except a few) but not the one you are trying as part of table or column name.

    Comment

    • amitpatel66
      Recognized Expert Top Contributor
      • Mar 2007
      • 2358

      #3
      Change the table name from Pathogen(s) to Pathogen then try creating a table.

      Table of any name can be created by using a double quotes but its not at all advisable to do so.

      If your business requirement strictly requires table name to be Pathogen(s) then try creating a table by enclosing Pathogen(s) in double quotes like "Pathogen(s )".

      Also note if you create a table by using a double quote then the object name becomes case sensitive and you will have to use double quotes everytime you select/perform DML's on that particular table.

      Comment

      • TiaTia
        New Member
        • Jul 2010
        • 2

        #4
        Originally posted by amitpatel66
        Change the table name from Pathogen(s) to Pathogen then try creating a table.

        Table of any name can be created by using a double quotes but its not at all advisable to do so.

        If your business requirement strictly requires table name to be Pathogen(s) then try creating a table by enclosing Pathogen(s) in double quotes like "Pathogen(s )".

        Also note if you create a table by using a double quote then the object name becomes case sensitive and you will have to use double quotes everytime you select/perform DML's on that particular table.
        Thank you very much for your suggestion and it worked.

        Comment

        Working...