Need to add constraint: date plus 10 days
问题 I'm trying to add a constraint to a table so that it displays one of the columns as the current date plus 10 days. Here's what I've tried so far (I'm very new to SQL): ALTER TABLE orders ADD CONSTRAINT default_date DEFAULT DATEADD (DAY,10,required_date) FOR required_date Halp! Edit: I've also tried this now: ALTER TABLE orders ALTER COLUMN required_date ADD CONSTRAINT required_date_plus_ten DEFAULT DATEADD (DAY,10,required_date) Edit: Thanks to ypercube & my classmate. The final code is: