如何在MySQL中将持续时间值存储为TIME数据类型? [英] How to store time duration values in MySQL as the TIME datatype?
本文介绍了如何在MySQL中将持续时间值存储为TIME数据类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要以分钟/秒为单位存储歌曲持续时间,我需要使用TIME,但是在编写INSERT语句时如何指代某个持续时间?我在表中的数据类型已经是TIME,我应该STR_TO_DATE字符串值"4:29"吗?
I need to store song durations in minutes/seconds, I need to use TIME, but how would I refer to a certain duration when I am writing an INSERT statement? My datatype in the table is already TIME, should I just STR_TO_DATE the string value of "4:29"?
推荐答案
查看全文