Default Type of Bit Value Assigned to User Variables



By default, the bit values assigned to the user variables are binary strings. It can be illustrated by assigning the bit value to a user variable and then by retrieving them as follows −

mysql> SET @abc = 0b1000011;
Query OK, 0 rows affected (0.00 sec)

mysql> Select @abc;
+------+
| @abc |
+------+
| C    |
+------+
1 row in set (0.00 sec)

The above result set shows that the default type of a bit value assigned to user variables are binary strings.

Updated on: 2020-06-22T05:39:42+05:30

151 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements