mysql数据类型

来源:互联网 发布:node web 编辑:程序博客网 时间:2024/06/15 12:30

数据类型:1、数值类型:整形和小数 float和double属于浮点 decimal字符串 unsigned属性把数据范围扩大了一倍

                   2、字符类型:字符、bloe text  enum set 

                   3、时间日期   date 、time

常量 1、字符串常量 2、数值常量 3、十六进制常量  4、时间日期常量 5、位字段值  6、布尔值  7、NULL值

变量 1、用户变量  2、系统变量

   select @@version;获得现在使用的Mysql版本

  select current_time 获得系统当前时间

运算符:+ - *  / %

比较运算符 : = > < <= >=  <> != 

逻辑运和算符 not  and or  xor

select表达式

select 表达式

update  tb1 set  salary=5000;

update tb1 setsalary=7000 where name=’zhangsan’;

update tb1 setsalary=salary+3000  where name=’lisi’;


原创粉丝点击