I want to know datatype of column after using a function.
SELECT timediff(date('2020-10-01 00:00:00'), date('2020-10-00 00:00:00'));
After using timediff function what datatype is it? I’ve looked at the doc to search for output datatype of a function https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html but could not find, Also it would be inefficient to memorize which function outputs what datatype, so I would like to perform an operation creating new column and know its exact datatype.
When I connect MySQL to python and check its datatype it is timedelta but is it also called timedelta in MySQL?
After using timediff function what datatype is it? I’ve looked at the doc to search for output datatype of a function but could not find.
Well, the documentation sure gives you the answer (emphasis mine):
expr1 − expr2expressed as a
The result returned by
TIMEDIFF()is limited to the range allowed for
TIMEvalues. Alternatively, you can use either of the functions
UNIX_TIMESTAMP(), both of which return integers.