Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

boolean

eBauereBauer Member Posts: 3
I have looked through the MySQL Manual, but I wasn't able to find what I was looking for.

I am trying to find a boolean type in MySQL.

I know I can use a tinyInt and have a 0 or 1 put in, but I was kinda hoping for a TRUE / FALSE thing.

Thanks in advance

Comments

  • jcarlssonjcarlsson Member Posts: 21
    : I have looked through the MySQL Manual, but I wasn't able to find what I was looking for.
    :
    : I am trying to find a boolean type in MySQL.
    :
    : I know I can use a tinyInt and have a 0 or 1 put in, but I was kinda hoping for a TRUE / FALSE thing.

    1 is mostly seen as true when you write a program and 0 is false, it is common sense in the languages ;-)

    try using tinyInt with 1 and 0 as true and false, I think that it should work just fine
    [red]--[/red]
    [green]jcarlsson[/green] [blue]<[/blue][purple]jcarlsson@linux.nu[/purple][blue]>[/blue]
    [red]http://www.jcarlsson.tk[/red]

  • eBauereBauer Member Posts: 3
    : : I have looked through the MySQL Manual, but I wasn't able to find what I was looking for.
    : :
    : : I am trying to find a boolean type in MySQL.
    : :
    : : I know I can use a tinyInt and have a 0 or 1 put in, but I was kinda hoping for a TRUE / FALSE thing.
    :
    : 1 is mostly seen as true when you write a program and 0 is false, it is common sense in the languages ;-)
    :
    : try using tinyInt with 1 and 0 as true and false, I think that it should work just fine
    : [red]--[/red]
    : [green]jcarlsson[/green] [blue]<[/blue][purple]jcarlsson@linux.nu[/purple][blue]>[/blue]
    : [red]http://www.jcarlsson.tk[/red]
    :
    Thank you, I suppose I was looking to just try to save space, but I don't think I can expect to get anything smaller than a byte.

    Thank you
  • Chris BrownChris Brown USAMember Posts: 4,624 ✭✭

    ______ ( http://forcoder.org ) free video tutorials and ebooks about [ C#, Scratch, PL/SQL, Perl, Go, Java, Delphi, C++, MATLAB, Objective-C, R, Visual Basic, PHP, JavaScript, Swift, Python, Assembly, C, Visual Basic .NET, Ruby Scala, F#, Transact-SQL, Rust, Julia, LabVIEW, Crystal, Dart, Awk, Lisp, Scheme, Apex, ABAP, Ada, FoxPro, COBOL, Clojure, Kotlin, Alice, Bash, SAS, ML, D, Logo, VBScript, Erlang, Fortran, Lua, Prolog, Hack ] _________

Sign In or Register to comment.