#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    17
    Rep Power
    0

    Understanding make_set


    Hi

    with reference to http://dev.mysql.com/doc/refman/5.6/en/string-functions.html#function_make-set


    mysql> SELECT MAKE_SET(1 | 4,'hello','nice','world');
    -> 'hello,world'
    mysql> SELECT MAKE_SET(1 | 4,'hello','nice',NULL,'world');
    -> 'hello'

    I don't understand why the outcome is as above,

    Code:
    mysql> SELECT MAKE_SET(1 | 4,'hello','nice','world');
            -> 'hello,world'
    in this case there'a only 3 bits if 4th bit is specified what happens?


    also how do I display world?


    thanks
  2. #2
  3. Come play with me!
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,749
    Rep Power
    9397

IMN logo majestic logo threadwatch logo seochat tools logo