Assume I create table users
with columns (firstname, lastname, email, address etc.
). CrateDB
automatically adds _id
column, whose values are some kind of weird strings.
If I set email
column as PRIMARY KEY on table creation, then _id
column becomes filled with values from email
column, i.e. ID's of records become emails. Is there any way to retain "weird strings" as ID's in _id
column and leave email
column as PRIMARY KEY?
P.S. email
column must be PRIMARY KEY, as I want to ensure unique emails in that column.