IT. Expert System.

MYSQL

BIT


Description

A Bit in MySQL is also known as Bit-field values, which can be represented as b ‘value’ or 0b ‘value’. The term value is a binary value written in zeros and ones.

Examples

The following examples show the basic use of this literal:

mysql> CREATE TABLE t (b BIT(8));
mysql> INSERT INTO t SET b = b'11111111';
mysql> INSERT INTO t SET b = b'1010';
mysql> INSERT INTO t SET b = b'0101';

Binary values are returned in BIT values. Add 0 or BIN() to display the values in printable form.

mysql> SELECT b+0, BIN(b+0), OCT(b+0), HEX(b+0) FROM r;

Bit values which are assigned to the user variables are known as the Binary strings. Use CAST() or 0: to assign a bit value in user variable.

mysql> SET @c1 = 0b1000001;
mysql> SET @c2 = CAST(0b1000001 AS UNSIGNED), 
 @c3 = 0b1000001+0;
mysql> SELECT @c1, @c2, @c3;


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 400 / 158859448. Delta: 0.04463 с