how to get current datetime in SQL?
问题 Want to get current datetime to insert into lastModifiedTime column. I am using MySQL database. My questions are: is there a function available in SQL? or it is implementation depended so each database has its own function for this? what is the function available in MySQL? 回答1: Complete answer: 1. Is there a function available in SQL? Yes, the SQL 92 spec, Oct 97, pg. 171, section 6.16 specifies this functions: CURRENT_TIME Time of day at moment of evaluation CURRENT_DATE Date at moment of