Could anyone please help me to get rid of following error? I want to set the
'ishuman' column based on the value of 'ID' column but it is not allowing me
to do so. Any alternatives?
techdb=> CREATE TABLE Users (
ID INTEGER,
isHuman BOOLEAN NOT NULL
DEFAULT (ID IS NULL)
CHECK (isHuman = ID IS NULL),
Name VARCHAR NOT NULL);
ERROR: cannot use column references in default expression
techdb=>
Thanks,
Jignesh