Skip to main content

Mysql query to get current date from database?

The fine manual has this to say about the NOW function:

mysql> SELECT NOW();
        -> '2007-12-15 23:50:26'
 
If you want just the date, then use CURDATE. The fine manual has this to say
about the CURDATE function: 

mysql> SELECT CURDATE();
        -> '2008-06-13'

Comments

  1. market cap. There is a critical factor that investors should be aware of regarding this growth. As correctly pointed out by New Street Research analyst and US consumers already shifted a significant chunk of their budget to luxury products. amazon market cap and tesla market cap

    ReplyDelete
  2. virtual edge. 28 percent of the time that attendees spend exploring the platform before a virtual event is spent browsing exhibitors and 8 percent is spent looking at exhibitor products. invitation letter for event and sample introduction of speakers

    ReplyDelete

Post a Comment

Popular Posts

How to find out Max Salary from each department

You can find maximum salary for each department by grouping all records by DeptId and then using MAX() function to calculate maximum salary in each group or each department. SQL Query: SELECT DeptID, MAX(Salary) FROM Employee  GROUP BY DeptID. This questions become more interesting if Interviewer will ask you to print department name instead of department id, in that case you need to join Employee table with Department using foreign key DeptID, make sure you do LEFT or RIGHT OUTER JOIN to include departments without any employee as well.  Here is the query