简体   繁体   中英

ORA-00907: missing right parenthesis error

CREATE TABLE dbo.PhotoLibrary (
    PhotoLibraryID INT IDENTITY (1, 1) PRIMARY KEY,
    ImageName      VARCHAR(100),
    Photo          VARBINARY(MAX)
)

While using the above code in SQL I am getting the error help me

You are passing in SQL Server code to Oracle. Big problem.

CREATE TABLE PhotoLibrary (
  PhotoLibraryID INT    PRIMARY KEY,
  ImageName        VARCHAR2(100),
  Photo            VARBINARY(MAX)
);

Oracle doesn't understand identity . If you want an auto-incrementing column, then you need to use a sequence. Here is an example.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM