Difference between pages "CURRENT DATE/de" and "CURRENT TIMESTAMP"

From SQLZOO
< CURRENT DATE(Difference between pages)
Jump to: navigation, search
(Created page with "Category:Deutsch <table align='right' border='1'> <caption>Kompatibilität</caption> <tr><th colspan='3'>CURRENT_DATE</th></tr> <tr><td align='center'>'''DBMS'''</td><td a...")
 
 
Line 1: Line 1:
[[Category:Deutsch]]
 
 
<table align='right' border='1'>
 
<table align='right' border='1'>
<caption>Kompatibilität</caption>
+
<caption>Compatibility</caption>
<tr><th colspan='3'>CURRENT_DATE</th></tr>
+
<tr><th colspan='3'>CURRENT_TIMESTAMP</th></tr>
<tr><td align='center'>'''DBMS'''</td><td align='center'>'''OK'''</td><td align='center'>'''Alternative'''</td></tr>
+
<tr><td align='center'>'''Engine'''</td><td align='center'>'''OK'''</td><td align='center'>'''Alternative'''</td></tr>
<tr><td align='left'>Ingres</td><td>Ja</td><td>Mit DBD::Ingres muss CAST verwendet werden.</td></tr>
+
<tr><td align='left'>ingres</td><td>Yes</td><td></td></tr>
<tr><td align='left'>MySQL</td><td>Ja</td><td></td></tr>
+
<tr><td align='left'>mysql</td><td>Yes</td><td></td></tr>
<tr><td align='left'>Oracle</td><td>Ja</td><td></td></tr>
+
<tr><td align='left'>oracle</td><td>Yes</td><td></td></tr>
<tr><td align='left'>PostgreSQL</td><td>Ja</td><td></td></tr>
+
<tr><td align='left'>postgres</td><td>Yes</td><td></td></tr>
<tr><td align='left'>SQL Server</td><td>Nein</td><td>[[CURRENT_TIMESTAMP/de |CONVERT(CHAR(10),CURRENT_TIMESTAMP,126)]]</td></tr>
+
<tr><td align='left'>sqlserver</td><td>Yes</td><td></td></tr>
 
</table>
 
</table>
  
<h1>CURRENT_DATE</h1>
+
<h1>CURRENT_TIMESTAMP</h1>
<p>CURRENT_DATE liefert das aktuelle Systemdatum.</p>
+
<p>CURRENT_TIMESTAMP returns the current date and time. </p>
 
<p></p>  
 
<p></p>  
<pre style='width:60ex'>
+
<pre style='width:80ex'>
  CURRENT_DATE -> '2006-12-31'
+
CURRENT_TIMESTAMP -> '2006-12-31 18:03:44'
 
</pre>
 
</pre>
  
<div class='ht'>  
+
<div class='ht'>
<source lang='sql' class='def e-sqlserver'>
+
<div class=params>schema:gisq</div>
 +
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.
 +
<source lang='sql' class='def e-oracle'>
 
SELECT CURRENT_TIMESTAMP, whn
 
SELECT CURRENT_TIMESTAMP, whn
  FROM eclipse
+
   FROM gisq.eclipse
</source>
+
<source lang='sql' class='def e-oracle'>
+
SELECT CAST(CURRENT_DATE AS DATE),wk
+
   FROM gisq.totp
+
 
</source>
 
</source>
 
<source lang='sql' class='def'>
 
<source lang='sql' class='def'>
SELECT CAST(CURRENT_DATE AS DATE),wk
+
SELECT CURRENT_TIMESTAMP, whn
   FROM totp
+
   FROM eclipse
 
</source>
 
</source>
 
</div>
 
</div>
  
<p>Siehe auch</p>
+
<p>See also</p>
 
<ul>
 
<ul>
  <li>[[CURRENT_TIMESTAMP/de | Funktion CURRENT_TIMESTAMP]]</li>
+
   <li>[[%2B(dates) |+(dates) function]]</li>
   <li>[[%2B(dates)/de | Funktion +(date)]]</li>
+
 
</ul>
 
</ul>
  
 
{{Languages}}
 
{{Languages}}

Revision as of 17:42, 21 October 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'  
schema:gisq

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

Language: English  • Deutsch
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense