MYSQL 主键自动增长,同事获取系统时间:
在Oracle中系统时间为sysdate,在mysql中呢?
以下是我总结mysql取得系统时间的功能。
select now() as Systime;
select current_date as Systime;
select sysdate() as Systime;
ff CREATE TABLE `ff` (
`id` int(9) NOT NULL AUTO_INCREMENT,
`createtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`username` varchar(20) DEFAULT NULL,
`record` varchar(20) DEFAULT NULL,
`log` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1
在Oracle中系统时间为sysdate,在mysql中呢?
以下是我总结mysql取得系统时间的功能。
select now() as Systime;
select current_date as Systime;
select sysdate() as Systime;