自己学下mysql还是迷糊
reate table Focus
(
pid int(11) auto_increment not null primary key,
ppics varchar(50),
ptexts varchar(50),
plinks varchar(50),
pdates datetime default (now()),
isshow varchar(2) not null
);
为啥出错啊
reate table Focus
(
pid int(11) auto_increment not null primary key,
ppics varchar(50),
ptexts varchar(50),
plinks varchar(50),
pdates datetime default (now()),
isshow varchar(2) not null
);
为啥出错啊
解决方案 »
- mysql 查询主键排序问题
- mysql备份恢复方案,需要写哪些方面?
- 如何重新规划分区?
- 帮忙看看哪儿错了?多谢
- 有没有mysql的存储过程实例,长点的,完整的,项目中用到的
- 我又来了,还是哪条SQL语句麻烦 XqYuan() 能再次解答,其他高手知道也请解答下,谢谢了
- 请大家帮帮忙!一个mysql查询的问题
- mysql怎样运行啊,我已经安装了,然后呢???我的是windows2000
- 谁有MYSQL 4.1 给我 一个份
- 那里有工具将SQL sever的数据库转换成MySQL的??求救啊……
- 使用游标出现 No data - zero rows fetched, selected, or processed
- 如何合并两个数据库里面的数据?
改为:pdates timestamp default current_timestamp(),
楼上正解。 NOW()是微软系列的当前时间,在其它数据库产品中往往不是。甚至包括微软自己的SQL SERVER.建议参考一下mySQL的参考手册中函数,日期时间函数部分。
http://dev.mysql.com/doc/refman/5.1/zh/functions.html#date-and-time-functions
MySQL中是有 now()函数的mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2009-03-13 12:49:11 |
+---------------------+
1 row in set (0.00 sec)