Jump to content

[MySQL Database]


Cydh

Recommended Posts


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

first, I don't know the correct section to post. :P

 

about item identify value, it's only contains 0 and 1, or there is something else by default?

why don't use enum for it? now is using smallint:6

 

if identify only 0 or 1 is using smallint:6, why refine that 0~20 is tinyint:3? :P

 

Integer Types (Exact Value)

 

MySQL-NumericTypes.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  145
  • Reputation:   15
  • Joined:  01/06/12
  • Last Seen:  

because they using standard format enum is not available on MSSQL.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

I think we can use tinyint(1) or bit(1)

Edited by goddameit
  • Upvote 3
Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  04/20/13
  • Last Seen:  

I think you can use tinyint(1) or bool type.

enum is a string type data with a value

For example, ENUM('a', 'b', 'c')

a's value is 1, b's value is 2, and c's value is 3

so it's not suitable for use enum here.

Edited by Fanny
Link to comment
Share on other sites

×
×
  • Create New...