Home > Database > Mysql Tutorial > mysql设置-mysql如何设置当前日期

mysql设置-mysql如何设置当前日期

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 09:39:53
Original
1203 people have browsed it

mysqlmysql设置

创建mysql下的表格:

CREATE TABLE member(
mid VARCHAR(50) PRIMARY KEY,
password VARCHAR(32) NOT NULL ,
name VARCHAR(30) NOT NULL ,
address VARCHAR(200) NOT NULL ,
telephone VARCHAR(100) NOT NULL ,
zipcode VARCHAR(6) NOT NULL ,
lastdate timestamp DEFAULT now()
);
INSERT INTO member(mid,password,name,address,telephone,zipcode) VALUES ('admin','222','admin','home','0101111','100191');
出现的表格如下:
mysql> select * from member;
+-------+----------+-------+---------+-----------+---------+---------------------+
| mid | password | name | address | telephone | zipcode | lastdate |
+-------+----------+-------+---------+-----------+---------+---------------------+
| admin | 222 | admin | home | 0101111 | 100191 | 2015-07-23 00:53:06 |
+-------+----------+-------+---------+-----------+---------+---------------------+
我不想设置的时间格式为“2015-07-23 00:53:06”,需要的结果是“ 2015-07-23”,
请问,我的格式该怎么设置和修改?

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template