
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
What is the default type of a 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.
- Related Articles
- What is the default type of a hexadecimal value in MySQL?
- What MySQL would return if we refer a user variable which is not assigned any value explicitly?
- What is the difference between dynamic type variables and object type variables?
- What are the default values of instance variables whether primitive or reference type in Java?
- What are the properties of MySQL user variables?
- Set default value to a JSON type column in MySQL?
- How can we assign a bit value as a number to a user variable?
- What is a default value in Python?
- What is the similarity between prepared statements and MySQL user variables?
- What is the default value of a local variable in Java?\n
- How to Change the Default Home Directory of a User on Linux?
- What do you mean by default MySQL database for the user?
- Default values of static variables in C
- How can I return a record from a table nearest to a user-defined variables value in MySQL?
- User-defined variables vs Local Variables in MySQL?

Advertisements