Results 1 to 4 of 4

Thread: MYSQL True or faluse

Hybrid View

  1. #1

    MYSQL True or faluse

    Hi all,

    I am pretty new to MYSQL I am creating a table and have got a few question.

    1)How do I set a boolean Value True/False is it case of

    DelPresenter bool not null,

    2)This is the code for my first table (below) my question is the engine = innodb do I have to have this line for every table I make ??

    create table delegate
    (DelNo int not null,
    DelName varchar() not null,
    DelAddress varchar() not null,
    DelTelphone varchar(),
    DelPresenter bool,
    primary key (DelNo))
    engine = innodb;

    many thanks
    comming soon

  2. #2
    1/
    Yep

    or DelPresenter TINYINT(1) not null,

    BOOL & BOOLEAN are synonyms for TINYINT(1) and zero values are false all non-zero values are true.

    2/ Yes if you want to use InnoDB as the storage engine for your database.

  3. your a star
    My directory: MyDirectory FOR SALE
    My sites: Obtain a cash advance | Sound Unsound

  4. #4
    It means the column can store anywhere from 0 to 15 characters. If you only ask it to store 3 bytes, it won't pad the other 12. BUT the database incurs some overhead (15 bytes in SQL Server, ironically) to manage a variable character column. Generally people use them with larger ranges, ie varChar(230), and in this case you basically pay for what you use.

Similar Threads

  1. Replies: 4
    Last Post: 23 January, 2010, 10:52 AM
  2. [WTS] DUI - True LLL
    By namebutler in forum Domains
    Replies: 1
    Last Post: 18 January, 2010, 06:41 AM
  3. True Blood!
    By m42 in forum Entertainment
    Replies: 4
    Last Post: 9 August, 2009, 17:42 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •