What is the difference between these commands?
ALTER TABLE podcast_episodes ADD COLUMN duration interval;
ALTER TABLE podcast_episodes ADD COLUMN duration interval SECOND(0);
ALTER TABLE podcast_episodes ADD COLUMN duration interval SECOND;
I would like to store duration of a podcast episode and later have podcast_playback_history with first_mark and last_mark to calculate percentage of the whole episode listened.
The docs said
The interval type has an additional option, which is to restrict the set of stored fields by writing one of these phrases:
YEAR
MONTH
DAY
HOUR
MINUTE
SECOND
YEAR TO MONTH
DAY TO HOUR
DAY TO MINUTE
DAY TO SECOND
HOUR TO MINUTE
HOUR TO SECOND
MINUTE TO SECOND
Note that if both fields and p are specified, the fields must include SECOND, since the precision applies only to the seconds.
Is there added benefit if I set it to second? Will it still be 16 bytes or will it be less? I tried using second and second(0), when I save the row it is still showing as '0 years 0 mons 0 days 0 hours 0 mins 2.00 secs'