title: CREATE TABLE, CHECK possible text values
body: <p>I'm using MS Access 2010 and I'm trying to create tables using SQL. I would like to put in some check constraints but I'm having some troubles:</p>
  
  <pre><code>CREATE TABLE Test (
  tester Text CHECK (tester IN ('ABC', 'BCD', 'CDE'))
  );
  </code></pre>
  
  <p>I'm getting a syntax error,</p>
  
  <p>Any suggestions?</p>
  
  <p>Thank you!</p>
  
  <p>EDIT: Sorry if I wasn't clear. What I would like actually is to CHECK that tester is either "ABC", "BCD" or "CDE" those are the only values he can have.</p>
  
  <p>EDIT2: I tried something else:</p>
  
  <pre><code>CREATE TABLE Test (
  tester Text NOT NULL,
  CONSTRAINT m_pk PRIMARY KEY(tester),
  CONSTRAINT check_tester CHECK (DATALENGTH(tester) &gt; 2)
  );
  </code></pre>
  
  <p>and I also get a syntax error. Is there something I'm really not understanding with checking Text values? I can't possibly see where either of these is wrong.</p>