Hello, evenryone!
I`m a novice with a little question: how could I create a table`s column with a check constraint between values of two columns like in the example (
"limit" >= balance
):
Copy code
CREATE TABLE IF NOT EXISTS account (
id uuid PRIMARY KEY,
balance DECIMAL(16,2) NOT NULL DEFAULT 0 CHECK (balance >= 0),
"limit" DECIMAL(16,2) NOT NULL DEFAULT 0 CHECK ("limit" >= balance)
);