title: how to create check constraint in maria DB for checking char type multiple values?
body: <p>i have working for my college project of QuestionAnswer site like StackOverflow but i have face one problem in creating tables in Maria DB </p>
  
  <p>i use latest version of XAMPP which by default use maria DB instead of MYSQL</p>
  
  <p>so i want to create post table which contain post type (p_type) like (question, answer, comment),</p>
  
  <p>i use following code</p>
  
  <pre><code>create table post
  (
   p_type char(1) check(p_type = 'q' OR p_type = 'a' OR p_type = 'c')
  );
  </code></pre>
  
  <p>and i use InnoDB storage engine and Maria DB version is 10.1.30<br>
  but when i insert other character like (s,z,x) is store in database 
  which means Check constraint is not applied,</p>
  
  <p>i also visited the Maria DB manual for Check Constraint but there is no any example related to Char type.</p>
  
  <p>so any answer would be appreciated
  thanks in advance</p>