whats the point of specifying a table if now() is going to be the same for any table.??
Try without specifying table, like this
SELECT NOW()
There are also
CURDATE() and CURTIME()
http://www.w3schools.com/sql/func_now.asp
EDIT: The same way in MS SQL, you can write a query like
SELECT getdate()
As far as I know FROM was needed in the SQL-92 standard (at least; that was the version I was able to find with some nice BNF grammar moments ago).
Maybe the logic behind was "functions" should use tables for producing output, so you have to specify something. In fact, I see quite low practical value in a query that only outputs the actual time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With