Interview Answer

If McDonalds were run like a software company, one out of every hundred Big Macs would give you food poisoning, and the response would be, ‘We’re sorry, here’s a coupon for two more.’ “ Mark Minasi

Write a SQL query to display the current date

April 10, 2016 6:26 pm

Comments



Write a SQL query to display the current date


The DUAL table is a special one-row, one-column table present by default in Oracle and other database installations. The sysdate returns the current date from the oracle database server.

													SELECT sysdate from dual;
													

The to_char funcation format the date.


Solution

   					 SELECT TO_CHAR(SYSDATE, 'MM-DD-YYYY HH24:MI:SS') "NOW"  FROM DUAL;				    

Comments



Please login to add comments.