Browsing: 数据库

mysql查询当月数据: select * from table where datetime unix_timestamp(concat(date_format(now(),%Y-%m-),01)); datetime:表中的时间戳字段; unix_timestamp(concat(date_format(now(),%Y-%m-),01):当月第一天的开始时间戳

1:删除列 alter table 【表名】 drop 【列名】 2:增加列 alter table 【表名】 add 【列名】 int not null comment 注释说明 3:修改列的类型信息 alter table 【表名】modify 【列名】 char(10) 4:重命名

通过excel把数据导入到mysql时,经常会出现一些空格或者其他特殊字符导致的空白,这样数据在程序中就会运行异常,比如可能导致数据查询异常、mysql内置md5算法加密后的数据与php程序