How do DEFAULT, CHECK, and NOT NULL work together?

You're adding a quantity column to an orders table. If no quantity is provided, the database should use 1, but only positive numbers may be stored. Explain what DEFAULT, CHECK, and NOT NULL each do. What happens if an insert omits the column, explicitly supplies NULL, or specifies a negative quantity?

ExplainDDL, keys, and normalizationJuniorBackendQAData Engineer