Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2006
    Posts
    12

    Smile Unanswered: equivalent in oracle

    whats the equivalent of the below sql server script in Oracle PL/SQL

    CREATE TABLE [omx].[UserAuthorization](
    [MemberAuthorizationRecordIdentifier] [bigint] IDENTITY(1,1) NOT NULL,

    CONSTRAINT [PK_UserAuthorization] PRIMARY KEY CLUSTERED
    (
    [MemberAuthorizationRecordIdentifier] ASC
    )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]


  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    It looks somewhat like:
    Code:
    CREATE TABLE UserAuthorization
    (MemberAuthorizationRecordId INTEGER
    ,CONSTRAINT PK_UserAuthorization PRIMARY KEY
    (MemberAuthorizationRecordId)
    );
    
    CREATE SEQUENCE UserAuthorization_seq;
    
    CREATE TRIGGER UserAuthorization_trg
    BEFORE INSERT ON UserAuthorization
    FOR EACH ROW
    BEGIN
      SELECT UserAuthorization_Seq.NEXTVAL
      INTO :NEW.MemberAuthorizationRecordId 
      FROM DUAL;
    END;
    /

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Rajesh438, you are flooding the Forum with the same question, but - as well - seem to be too lazy to check previous answers. Here is a complete one (I know because I wrote it).

    "Test your DB skills by answering this"?!? Right, DB skills ... Equivalent in Oracle, needed urgently; if it was that urgent, I guess you'd check previous answers already. Newbie introduction thread that means absolutely nothing.

    Wait a little bit longer - Autumn is almost here (in my part of the world) and THEN it will be time for rain and (God forbid!) floods.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •