mysql times,mysql timesstamp数据类型

在MySQL中创建表时遇到一个问题,无法在同一表中创建两个TIMESTAMP类型的列。这源于MySQL的一个限制。解决方案是将TIMESTAMP替换为DATETIME类型。这样可以成功在包括Linux CentOS和Apache服务器在内的环境中插入数据。
摘要由CSDN通过智能技术生成

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

解决方案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!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值