Primary key support

Hi Experts,

I haven’t found a way to make a column as primary key in the document. Any suggestions?


Hi Zipeng, OmniSci does not support primary keys. The workaround would be to delete duplicates on a column after import using the internal rowid column, something like this, where id is your “primary key”:

DELETE FROM thetable WHERE rowid NOT IN (SELECT MAX(rowid) FROM thetable GROUP BY id)
1 Like

Hi there - we dont support primary keys in omnisci. could you explain a little bit more detail on what you are trying to do that requires a PK, so we can help with alternatives?