how to present a past time in hours, minutes and seconds? : Sql dba



how to present a past time in hours, minutes and seconds? : Sql dba..

Answer / Amit Kumar Bajpai

To present the time in hours, minutes, and seconds from a timestamp column or variable in SQL, you can use date/time functions like EXTRACT. Here is an example for both MySQL and Oracle:nnMySQL:n```sqlnSELECT CONCAT(HOUR(TIMESTAMP_COLUMN), ' hours ', MINUTE(TIMESTAMP_COLUMN), ' minutes ', SECOND(TIMESTAMP_COLUMN), ' seconds');n```nOracle:n```sqlnSELECT TO_CHAR(TIMESTAMP_COLUMN, 'FFYY HH24:MI:SS') FROM dual;n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What is a temp table?

1 Answers  


what is the boundary line in varrays?

1 Answers   HCL,


what is a join? : Sql dba

1 Answers  


Does sql support programming?

1 Answers  


List the different type of joins?

1 Answers  


What is primary key and foreign key?

1 Answers  


How to create a table using constraints... IF i change the PARENT KEY value ,then CHILD KEY table will also to change in the another table... plz reply ur answers @ mak2786@gmail.com Arunkumar

3 Answers  


Why is sharding used?

1 Answers  


Q1.all the depts which has more then 10 empls? Q2.all the dept which does not have any emply? Q3 all the emp which does not have any dept? Q4 get all the emply detais with the dept details it dept is exit otherwise any emp details? Q5 how to debugg the dynamic sql and packages?

2 Answers  


What is orm in sql?

1 Answers  


What is not null in sql?

1 Answers  


Explain table and field in sql?

1 Answers  


Categories