Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • I said char(0) , not char(1)! Commented Jul 2, 2013 at 13:20
  • OK .. char(0) as stated it shows NULL but same applied to tinyint(1) as well only difference is you can leave a field blank incase with char(0) whereas tinyint(1) stores as 0 always practically for boolean type nobody wants to leave field BLANK Another thing if you can execute this query on a table which has char(0) and tinyint(1) then you will not see any recommend datatype to use so it's your choice either you can go ahead with char(0) or tinyint(1) but ..I and many MySQL expert recommneds to use tinyint(1) for practical use: SELECT * FROM DB.test PROCEDURE ANALYSE(1, 10); Commented Jul 2, 2013 at 13:44
  • I don't prefer any of them, I need to know pros and cons for each of them,Also I know many people suggests TINYINT, but this is not strong reason to select this one. Some of expert thinks different, I edit my answer to add link, check it if you want. Commented Jul 2, 2013 at 14:48
  • 2
    tinyint(1) will happily store 42 as well. The (1) does not limit the range of possible values. Commented Jul 2, 2013 at 14:54