SELECT this, that
FROM here
WHERE start >= NOW()
Sure you can:
WHERE start >= CURDATE()
You can use any expression in the WHERE
clause, using any inbuilt Date-and-Time function.
I'd use
WHERE start >= current_timestamp
Just because this should work in every DBMS. Don't know about NOW() though, maybe that's a standard function?
Update: well now I know NOW() does not work at least in Oracle, so I'd definitely go with current_timestamp, current_date etc, because these are in the standard. I've done a couple of DBMS migrations (DB2 -> MySQL, MySQL -> Oracle etc) and I'm glad we used the standards -compliant SQL where ever possible, which made the migrations relatively painless.
You can use any of the following three functions as per your requirements:
SELECT NOW(),CURDATE(),CURTIME()
The output of this query is -
NOW() | CURDATE() | CURTIME()
---------------------+----------------+----------
2008-11-11 12:45:34 | 2008-11-11 | 12:45:34
Edited: you can use these functions in Where clause as instructed.
You shouldn't to quote a function name
Use function names like this:
SELECT this, that FROM here WHERE start >= NOW();
SELECT this, that FROM here WHERE start >= CURRENT_DATE();