4 Replies Latest reply on May 9, 2012 11:37 AM by ShankarViji

    Check constraint help

      im trying to add a check constraint to a date field so that anyone 17 or under cannot be entered, but im not having much luck. can anyone tell me where im going wrong?
      When i try this:

      ALTER table player
      ADD constraint CHECK(DateOfBirth <= DATEADD(yy, -17, GETDATE()))

      i get:

      ora-00904: "YY" invaild identifier