
Answer-first summary for fast verification
Answer: A and B
Delta tables support `CHECK` and `NOT NULL` constraints to prevent the addition of bad data. These constraints can be added using the `ALTER` command. For example: `ALTER TABLE routes ADD CONSTRAINT negative_distance CHECK (distance >= 0);`. It's important to note that if the table already contains records that violate the constraint, the command will fail. This ensures that all existing and future data meets the specified conditions. For more information, refer to the documentation on constraints for Delta tables.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.