Difference between revisions of "CURRENT TIMESTAMP"

From SQLZOO
Jump to: navigation, search
Line 16: Line 16:
 
</pre>
 
</pre>
  
<div class='qu'>
+
<div class='ht'>
 
With a <code>GROUP BY</code> <code>region</code> statement each region shows up just once.
 
With a <code>GROUP BY</code> <code>region</code> statement each region shows up just once.
 
The MAX column gives the "largest" name in the region in the context of strings this is the last name alphabetically.  
 
The MAX column gives the "largest" name in the region in the context of strings this is the last name alphabetically.  
 +
<source lang='sql' class='def e-oracle'>
 +
SELECT CURRENT_TIMESTAMP, whn
 +
  FROM gisq.eclipse
 +
</source>
 
<source lang='sql' class='def'>
 
<source lang='sql' class='def'>
 
SELECT CURRENT_TIMESTAMP, whn
 
SELECT CURRENT_TIMESTAMP, whn

Revision as of 15:46, 16 July 2012

Compatibility
CURRENT_TIMESTAMP
EngineOKAlternative
ingresYes
mysqlYes
oracleYes
postgresYes
sqlserverYes

CURRENT_TIMESTAMP

CURRENT_TIMESTAMP returns the current date and time.

 CURRENT_TIMESTAMP -> '2006-12-31 18:03:44'  

With a GROUP BY region statement each region shows up just once. The MAX column gives the "largest" name in the region in the context of strings this is the last name alphabetically.

SELECT CURRENT_TIMESTAMP, whn
  FROM gisq.eclipse
SELECT CURRENT_TIMESTAMP, whn
  FROM eclipse

See also

Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense