在sql server中存储视频持续时间 [英] Storing video duration time in sql server
问题描述
在sql server中用于存储视频的持续时间信息的最合适的类型是什么?
What's the most appropriate type used to store the duration time information of a video in sql server?
推荐答案
a href =http://www.sqlteam.com/article/working-with-time-spans-and-durations-in-sql-server =nofollow noreferrer>几个选项,包括使用内置的DateTime或Time数据类型,具有偏移特定固定零(这将允许您使用内置的日期/时间函数来获取小时,分钟和秒等。
There are several options, including using the builtin DateTime or Time data type with offset from a particular fixed zero (which will allow you to use the built-in date/time function to get hours, minutes and seconds, etc.
如果您在SQL Server 2005之前,您可以将其与用户定义的数据类型技术(如果您的跨度小于24小时),以约束日期部分,以保证不会漫游。
If you were on pre-SQL Server 2005, you could combine it with a user-defined data type technique (if your spans are less than 24 hours) to constrain the date part to be guaranteed not to wander.
这篇关于在sql server中存储视频持续时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!