Mysql-study

Mysql 学习

 

一、mysql的数据类型mysql

    CREATE table zsw.testBit(id BIT(8));
    insert into zsw.testbit values(121),(b'11');.
sql

   b'11':二进制数据11;学习

   select bin(id+0) from zsw.testbit;spa

 查询二进制格式数据显示it

 

二、日期类型io

     2-一、TIMESTAMPtable

  1.4个字节储存(Time stamp value is stored in 4 bytes)test

  2.值以UTC格式保存( it stores the number of milliseconds)date

  3.时区转化 ,存储时对当前的时区进行转换,检索时再转换回当前的时区。select

 2-二、datetime

  1.8个字节储存(8 bytes storage)

  2.实际格式储存(Just stores what you have stored and retrieves the same thing which you have stored.)

  3.与时区无关(It has nothing to deal with the TIMEZONE and Conversion.)

相关文章
相关标签/搜索