When should I use UNSIGNED and SIGNED INT in MySQL?

后端 未结 8 850
后悔当初
后悔当初 2020-12-07 12:45

When should I use UNSIGNED and SIGNED INT in MySQL ? What is better to use or this is just personal prefernce ? Because I\'ve seen it used like this;

id INT         


        
8条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 13:04

    I think, UNSIGNED would be the best option to store something like time_duration(Eg: resolved_call_time = resolved_time(DateTime)-creation_time(DateTime)) value in minutes or hours or seconds format which will definitely be a non-negative number

提交回复
热议问题