简体   繁体   中英

SQL data type time

Is it possible to create a data type in SQL similar to time that only displays the hour and minutes instead of the hour, minutes and seconds.

For example, If I inserted values into a table with the data type time I would get hh:mm:ss. How could I insert a value that only displays hh:mm?

Use TIME . More generally, the format in which you want something displayed should not affect your decision of the format in which it should be stored.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM