MySQL社区

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
查看: 7300|回复: 3
打印 上一主题 下一主题

mysql 的getdate()问题

[复制链接]
gaofengai8 该用户已被删除
跳转到指定楼层
1#
发表于 2009-8-31 13:00:33 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
收藏收藏1 分享淘帖 顶 踩
2#
发表于 2009-9-1 09:33:18 | 只看该作者
不能用getdate(),如果想要默认值为当前时间,用timestamp吧
gaofengai8 该用户已被删除
3#
 楼主| 发表于 2009-9-1 10:07:49 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
4#
发表于 2009-9-1 10:16:00 | 只看该作者
依据:
The DEFAULT clause specifies a default value for a column. With one exception, the default value must be a constant; it cannot be a function or an expression. This means, for example, that you cannot set the default for a date column to be the value of a function such as NOW() or CURRENT_DATE. The exception is that you can specify CURRENT_TIMESTAMP as the default for a TIMESTAMP column.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|申请友链|小黑屋|Archiver|手机版|MySQL社区 ( 京ICP备07012489号   
联系人:周生; 联系电话:13911732319

GMT+8, 2024-5-18 22:36 , Processed in 0.064306 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表