2
Mr-Myrk
78d

Why the hell does mysql not have boolean fields? why do I have to use a whole integer for a bit? REEEEEEEEEEEEE

Comments
  • 4
    Also, postgresql is much better for more complicated queries, fight me
  • 0
    @Mr-Myrk like which ones? I'm thinking to give it a look, I need someone to convince me to 😁
  • 4
    Because this is how memory in a pc is implemented?
  • 1
    Isn't there a "bit"?
  • 1
    @Gregozor2121 as genius as i think this answer is, i don't think memory is thought out to be used as "dis number is an INTeger but it has max 5 digits"
  • 0
    I like the flexibility of using tinyints, 0: false, 1: true, 2: mmmmmaaaaybee
  • 3
    Byte is the smallest unit of memory addressable by a computer. Bit fields in a database aren't really bits they're integers anyways. MySQL just doesn't lie to you.
  • 0
    At least you only have to use a tinyint!
  • 0
    @AlgoRythm you could keep 8 booleans per row in a single byte
  • 0
    @dmonkey postgres supports arrays for one
Add Comment