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”,
请问,我的格式该怎么设置和修改?
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号