Results 1 to 4 of 4

Thread: MYSQL True or faluse

  1. #1
    winner is offline Newbie Net Builder
    Join Date
    Jun 2009
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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
    yere is offline Newbie Net Builder
    Join Date
    Jul 2009
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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. #3
    imported_whitey99's Avatar
    imported_whitey99 is offline Newbie Net Builder
    Join Date
    Jul 2009
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts
    your a star
    My directory: MyDirectory FOR SALE
    My sites: Obtain a cash advance | Sound Unsound

  4. #4
    johnting101 is offline Newbie Net Builder
    Join Date
    Jun 2009
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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, 18: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
  •