Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6833323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:57:51+00:00 2026-05-26T22:57:51+00:00

I am a university student and need to submit a coursework using iSQL* Plus

  • 0

I am a university student and need to submit a coursework using iSQL* Plus by Oracle.

I am trying to create a table with the following SQL Statement:

    CREATE  TABLE  Category 
( `id` INT(11) NOT NULL AUTO_INCREMENT ,
  `title` VARCHAR (45) NULL ,
  PRIMARY KEY (`id`) );

This results in the following message:

ORA-00911: invalid character

It’s referring to the tick ` sign. So I tried the following, using a single quote instead:

    CREATE  TABLE  Category 
( 'id' INT(11) NOT NULL AUTO_INCREMENT ,
  'title' VARCHAR (45) NULL ,
  PRIMARY KEY ('id') );

The error:

ORA-00904: : invalid identifier

So one more try with ” – The Error:

( "id" INT(11) NOT NULL AUTO_INCREMENT ,
          *

ORA-00907: missing right parenthesis

If I remove the (11) behind the INT it will complaint about the AUTO_INCREMENT attribute.

    CREATE  TABLE  Category 
( "id" INT NOT NULL AUTO_INCREMENT ,
  "title" VARCHAR (45) NULL ,
  PRIMARY KEY ("id") );

I thought SQL is SQL and there are not really differences on these very basic levels. I thought that things are getting different on deeper levels?

  • how I get my statement working?
  • what would you recommend for someone familiar with MySQL to learn Oracle?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:57:52+00:00Added an answer on May 26, 2026 at 10:57 pm

    Not all SQL is the same. Neither Oracle nor MySQL support the actual SQL standard of IDENTITY.

    Oracle does not use backticks… you don’t actually need to quote your identifiers. Better not to so you don’t end up inadvertently using an invalid character in an identifier.

    Oracle numerics are called NUMBER, and can take an optional precision and scale.

    CREATE TABLE Category
    (
      id    NUMBER(11)   NOT NULL,
      title VARCHAR2(45) NULL,
      PRIMARY KEY (id)
    )
    

    To do an AUTO_INCREMENT, create a sequence:

    CREATE SEQUENCE seq_category_id START WITH 1 INCREMENT BY 1;
    

    Then when you insert into the table, do this:

    INSERT INTO category
    VALUES (seq_category_id.nextval, 'some title');
    

    To do this automatically, like AUTO_INCREMENT, use a before insert trigger:

    -- Automatically create the incremented ID for every row:
    CREATE OR REPLACE trigger bi_category_id
    BEFORE INSERT ON category
    FOR EACH ROW
    BEGIN
        SELECT seq_category_id.nextval INTO :new.id FROM dual;
    END;
    

    Or:

    -- Allow the user to pass in an ID to be used instead
    CREATE OR REPLACE TRIGGER bi_category_id
    BEFORE INSERT ON category
    FOR EACH ROW
    DECLARE
        v_max_cur_id NUMBER;
        v_current_seq NUMBER;
    BEGIN
        IF :new.id IS NULL THEN
            SELECT seq_category_id.nextval INTO :new.id FROM dual;
        ELSE
            SELECT greatest(nvl(max(id),0), :new.id) INTO v_max_cur_id FROM category;
            SELECT seq_category_id.nextval INTO v_current_seq FROM dual;
            WHILE v_current_seq < v_max_cur_id
            LOOP
                SELECT seq_category_id.nextval INTO v_current_seq FROM dual;
            END LOOP;
        END IF;
    END;
    

    Now, as far as discovering these differences, you can often just search for something like “oracle identity” or “oracle auto_increment” to see how Oracle does this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a final year university IT Student and I'm having an issue trying to
I am a university student taking a HCI design course, and using C# and
I'm an undergraduate university student who also writes iPhone applications. Next year I'm expected
I currently am a student worker at a medium sized university. i work for
I'm teaching Java EE at the university, and this was a question a student
The university I work at uses Oracle for the database system. We currently have
I have three tables STUDENT, DEPARTMENT and COURSE in a University database... STUDENT has
I'm a university student learning programming. For practice I'm writing a blackjack program. I'm
I just finished my second year as a university CS student, so my real-world
I am a student at University so my experience is limited, hence the question.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.