
Bit-field notation is the notation with the help of which we can write bit-field values. The syntax of Bit-field notation is as follows −
Syntax
b’value’ OR0bvalue
Here, the value is a binary value written by using zeros and ones.
阿里云-虚拟数字人
阿里云-虚拟数字人是什么? …
2 查看详情
The mainly Bit-filed notation is convenient for specifying values to be assigned to BIT columns of MySQL table. Following example will demonstrate it −
mysql> Create table bit_testing (bittest BIT(8));Query OK, 0 rows affected (1.09 sec)mysql> INSERT INTO bit_testing SET bittest = b'10101010';Query OK, 1 row affected (0.07 sec)mysql> INSERT INTO bit_testing SET bittest = b'0101';Query OK, 1 row affected (0.13 sec)mysql> INSERT INTO bit_testing SET bittest = 0b0101;Query OK, 1 row affected (0.10 sec)
以上就是在MySQL中,什么是位字段表示法,以及如何使用它来编写位字段值?的详细内容,更多请关注创想鸟其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/239011.html
微信扫一扫
支付宝扫一扫