how to make 2 columns in DB as primary key

how to make 2 columns in DB as primary key .
There is a table with columns , fundid, business effective month, profit, loss and other fields.
I have made fundid as primary key. But I should make fundid and business effective month , both together as primary key . How to do that in CDT ?

OriginalPostID-249808

  Discussion posts and replies are publicly visible

Parents
  • @Priyanka,
    You can create additional column to save combination values of fundid and business effective month like FUN001_Jan, Make that additional column as PK in your CDT.
    From DB side Additional Column should be Unique Key, PK is (fundid and business effective month).

    https://forum.appian.com/suite/help/16.3/Database_Schema_Best_Practices.html#composite-keys

Reply
  • @Priyanka,
    You can create additional column to save combination values of fundid and business effective month like FUN001_Jan, Make that additional column as PK in your CDT.
    From DB side Additional Column should be Unique Key, PK is (fundid and business effective month).

    https://forum.appian.com/suite/help/16.3/Database_Schema_Best_Practices.html#composite-keys

Children
No Data