title: Mysql time format with auto %H:%i:%s
body: <p>This is my mysql query to select time from seconds.</p>
  
  <pre><code>SELECT TIME_FORMAT(SEC_TO_TIME(120),'%H:%i' )
  </code></pre>
  
  <p>This will return as 00:02 (HOUR AND MINUTES)</p>
  
  <p>I need to show time hour,minutes,seconds automatically if there is a hour and there is a minute. no need to show like 00:00:10.</p>
  
  <p>Is there any mysql function for doing this?</p>