保存生日的最佳字段是什么? [英] What is the best field to store the birthday?
本文介绍了保存生日的最佳字段是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须将用户的生日存储在我的mysql数据库中(例如12-11-1990
).
I have to store in my mysql database, the users's birthday ( like 12-11-1990
).
我必须使用哪种字段类型来存储它?
What field type do I have to use to store it ?
推荐答案
to store a date, you should probably use a date. to quote the documentation:
DATE类型用于具有日期部分但没有时间部分的值.
The DATE type is used for values with a date part but no time part.
这篇关于保存生日的最佳字段是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文