Home Forums SQL Server 2005 SQL Server Newbies Setting up SQL to only accept specific data in a specific field RE: Setting up SQL to only accept specific data in a specific field

  • Why even have field2? If it's the same as field1, why store the data twice?

    What you're asking for is most likely a check constraint. If you look up "constraints" in Books Online, it has samples and suggestions on the subject.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon