在MySql 5.0 的表里同时添加两个自动更新的timestamp字段
来源:互联网 发布:地方门户网站源码 编辑:程序博客网 时间:2024/05/17 18:46
create table user_info
(user_id int primary key auto_increment,
register_time timestamp not null DEFAULT CURRENT_TIMESTAMP,//注册时间是固定的,不会再变化
last_edit_time timestamp not null,//每次有更新时,要变化;
(user_id int primary key auto_increment,
register_time timestamp not null DEFAULT CURRENT_TIMESTAMP,//注册时间是固定的,不会再变化
last_edit_time timestamp not null,//每次有更新时,要变化;
unique (user_name)
……
);
<insert id="insertUser" parameterType="java.util.HashMap" useGeneratedKeys="true" keyProperty="user_id"> insert into user_info(user_name,password,email,self_pic,is_active,is_perfect,role_id,last_edit_time) values(#{username},#{password},#{email},#{selfpic},1,0,1,NOW()); </insert>
- 在MySql 5.0 的表里同时添加两个自动更新的timestamp字段
- mysql 添加[取消]timestamp的自动更新
- Mysql数据库的一个问题-----不能两个timestamp字段的默认值同时是CURRENT_TIMESTAMP
- MySQL数据库的数据类型timestamp的自动更新
- MySQL的timestamp类型自动更新问题
- MySQL的timestamp类型自动更新问题
- MySQL的timestamp类型自动更新问题
- MySQL的timestamp类型自动更新问题
- mysql中timestamp字段,在更新这个字段其他数据时候,不更新timestamp的时间
- MySQL 查询表里面的所有字段
- 在 thinkphp3.2的 两个表里面有相同字段 进行链表查询
- mysql同时查询两个Id字段的语法
- oracle10g 一个表里可添加的最大字段数
- 为Oracle 和 MSSQL 数据库表里的字段添加约束
- MYSQL-TIMESTAMP数据类型的默认值与自动更新问题
- MySql中的Timestamp类型字段的使用
- MySQL中timestamp字段的一些规则
- 根据一个表里的字段查询另一个表里的另一个字段,再将查询的字段添加到第一个表里
- 利用ganglia调优hadoop
- 【PAT Advanced Level】1018. Public Bike Management (30)
- Ubuntu下安装OpenSSH Server并在客户端远程连接Ubuntu(转)
- 接口 RandomAccess
- cocos2d-X 节点(CCLabelTTF.h)API
- 在MySql 5.0 的表里同时添加两个自动更新的timestamp字段
- 关于有时判断domin 中例如
- 利用dbms_stats收集统计信息(待续)
- Python: overview of Fabric
- Python基础01 Hello World!
- cocos2d-X 节点(CCTileMapAtlas.h)API
- 数据结构与算法实验题 4.2 Who is the strongest
- 【ZZ】COleVariant与常用基本数据类型之间的转换
- recovery怎么保存log