0

this is my code. but i don't know where is the mistakes since i used 11g express edition. it shows error but no show which line the error

CREATE TABLE hsstaff
(
staff_ID int NOT NULL AUTO_INCREMENT,
staff_name varchar(50),
staff_address varchar(50),
staff_position varchar(20),
staff_telno varchar(15),
access_level varchar(15),
password varchar(10),
PRIMARY KEY (staff_ID)
);
Michael Berkowski
  • 267,341
  • 46
  • 444
  • 390
user2969480
  • 1
  • 1
  • 1
  • 3
    My oracle knowledge is a bit lacking, but I'm pretty sure the issue is using `AUTO_INCREMENT` - Oracle uses sequences that you have to define/create. – Taryn Nov 08 '13 at 15:26
  • 1
    See: [How to create id with AUTO\_INCREMENT on Oracle?](http://stackoverflow.com/questions/11296361/how-to-create-id-with-auto-increment-on-oracle) – Michael Berkowski Nov 08 '13 at 15:27
  • 1
    There is no such thing as auto_increment in oracle. See this link http://stackoverflow.com/questions/11296361/how-to-create-id-with-auto-increment-on-oracle. – Poornima Nov 08 '13 at 15:29

1 Answers1

1

Remove AUTO_INCREMENT; this is not supported in Oracle.

Joe
  • 6,767
  • 1
  • 16
  • 29
  • YES, it's not support in 11g. You can only use sequences and constraint to achieve this. – DDDBA Aug 16 '21 at 04:35