Note that there are some explanatory texts on larger screens.

plurals
  1. POmysql bitwise operations with string columns
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COWithout knowing more about what you're trying to accomplish (from a conceptual perspective) it's hard to suggest an appropriate solution. How many non-zero flags does a user typically have in a profile? How many profiles typical per user? What do the flags actually represent? Does a given flag mean the same thing for all users? How many different flags can exist? A many-to-many flag table may actually be the best solution but without more details nobody here can tell you.
      singulars
    2. COI understand more or less what you want to do but you do realise this will make your database not compliant with first normal form? The definition of 1NF is that the table has no repeating groups and that all columns are scalar values. This means a column cannot have arrays, linked lists, tables within tables, or record structures, like those you find in other programming languages. This is going to lead to complications when roles start changing. If you really need to have this type of data stored SQL might NOT be the answer.
      singulars
    3. CO@Jim: the flags represent time periods in which the users are available (1) or not (0). Right now we have 238 periods. Tipically, a user will have two profiles: main profile and a temporary profile (example: is unavailable between two dates).
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload