1
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

trogdor
  • 1,626
  • 14
  • 17
Akshay Gupta
  • 220
  • 2
  • 9
  • `VARBINARY` is not an Oracle Data Type - [Oracle Create Table -> Missing Right Parenthesis](https://stackoverflow.com/questions/19054379/oracle-create-table-missing-right-parenthesis) – Thomas Taylor Sep 30 '22 at 20:46

1 Answers1

1

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.

Community
  • 1
  • 1
Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
  • `VARBINARY` is not an Oracle Data Type - [Oracle Create Table -> Missing Right Parenthesis](https://stackoverflow.com/questions/19054379/oracle-create-table-missing-right-parenthesis) – Thomas Taylor Sep 30 '22 at 20:45