mysql timesstamp数据类型 [英] mysql timesstamp datatype

查看:119
本文介绍了mysql timesstamp数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对mysql有疑问。

i已经创建了员工表,属性是



创建表员工(

eid varchar(10),

name varchar(20),

work_start_time timestamp, - problem1

work_end_time timestamp); --problem2



这个表是创建好的。可以将数据插入本地主机。但如果我插入在线服务器有一些问题。在线服务器操作系统是linux cent os和apache服务器。提到无法在同一个表中创建2个colum时间戳数据类型列。



给我解决方案plz

i have question about mysql.
i have created the table on employee and attribute is

create table employee(
eid varchar(10),
name varchar (20),
work_start_time timestamp, -- problem1
work_end_time timestamp);--problem2

this table is creation is ok.and can data insert into local host.but if i insert into the online server there is some problem.online server os is linux cent os and apache server. it is mention no way to create 2 colum timestamp data type colum in same table.

give me the solution plz

推荐答案

您在同一个表中根本不能有两个或更多TIMESTAMP列。这是对MySQL的限制。而不是TIMESTAMP使用DATETIME。



祝你好运!
You simply cannot have two or more TIMESTAMP columns in the same table. This is a restriction of MySQL. Instead of TIMESTAMP use DATETIME.

Good luck!


这篇关于mysql timesstamp数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆