February 2018
Intermediate to advanced
510 pages
16h 10m
English
Let's continue with the working days per week in a year example. Please refer to the working_days table schema provided earlier.
How can we specify that the Monday and Friday in the week 4 in the year 2017 are non-working days? The following is the INSERT query for this:
INSERT INTO working_days VALUES(2017, 4, 0111011);
If we fetch the working_days records using the SELECT query, the following is the output:
mysql> SELECT year, week, days FROM working_days;+--------+---------+--------+| year | week | days |+--------+---------+--------+| 2017 | 4 | 59 |+--------+---------+--------+
In the preceding output, the days, though being of bit data types, show integer values. How can we show bit values in the output?
The answer ...
Read now
Unlock full access