Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • MAKE_SET(bits,str1,str2,...) mysql function

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 340
    Comment on it

    MAKE_SET(bits,str1,str2,...)

    MAKE_SET function returns a set of values which are from string containing substrings separated by , characters, consisting of the strings that have the corresponding bit in bits set. str1 corresponds to bit 0, str2 to bit 1, and so on. If there is any NULL value in str1, str2, ... then NULL values are not appended to the result.

    Here are some example which will explain you this function-

    mysql> SELECT MAKE_SET(1|4,'Hello','ABC','MySQL','.','XYZ');
    +-----------------------------------------------+
    | MAKE_SET(1|4,'Hello','ABC','MySQL','.','XYZ') |
    +-----------------------------------------------+
    | Hello,MySQL                                   |
    +-----------------------------------------------+
    1 row in set (0.00 sec)
    
    mysql> SELECT MAKE_SET(1|4,'A','B','C','D','E');
    +-----------------------------------+
    | MAKE_SET(1|4,'A','B','C','D','E') |
    +-----------------------------------+
    | A,C                               |
    +-----------------------------------+
    1 row in set (0.01 sec)
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: