Difference between pages "SQLZOO:SELECT basics" and "+(dates)/de"
(Difference between pages)
(→Introducing the BBC Table of Countries) |
|||
Line 1: | Line 1: | ||
− | + | [[Category:Deutsch]] | |
− | + | <table align='right' border='1'> | |
− | <table | + | <caption>Kompatibilität</caption> |
− | < | + | <tr><th colspan='3'>d + i</th></tr> |
− | < | + | <tr><td align='center'>'''DBMS'''</td><td align='center'>'''OK'''</td><td align='center'>'''Alternative'''</td></tr> |
− | <th> | + | <tr><td align='left'>Ingres</td><td>Nein</td><td>whn + date('7 day')</td></tr> |
− | + | <tr><td align='left'>MySQL</td><td>Ja</td><td></td></tr> | |
− | + | <tr><td align='left'>Oracle</td><td>Ja</td><td></td></tr> | |
− | </tr> | + | <tr><td align='left'>PostgreSQL</td><td>Nein</td><td>[[%2B_INTERVAL/de |d+ INTERVAL 'i DAY']]</td></tr> |
− | <tr> | + | <tr><td align='left'>SQL Server</td><td>Ja</td><td></td></tr> |
− | <td> | ||
− | |||
− | <td align=' | ||
− | <td align=' | ||
− | |||
− | </tr> | ||
− | <tr> | ||
− | <td> | ||
− | <td> | ||
− | <td | ||
− | <td align=' | ||
− | <td | ||
− | < | ||
− | |||
− | <td> | ||
− | < | ||
− | <td align=' | ||
− | <td | ||
− | <td | ||
− | </tr> | ||
− | <tr> | ||
− | <td> | ||
− | <td> | ||
− | <td | ||
− | <td align=' | ||
− | <td></td> | ||
− | |||
− | |||
− | <td | ||
− | </tr> | ||
</table> | </table> | ||
− | < | + | <h1>+ (dates)</h1> |
− | + | <p>d + i liefert ein Datum, das i Tage nach dem Datum d liegt.</p> | |
− | + | <pre style='width:80ex'> | |
− | + | DATE '2006-05-20' + 7 -> DATE '2006-05-27' | |
− | < | + | </pre> |
− | + | <div class=params>schema:gisq</div> | |
− | <source lang='sql' class='def'> | + | <div class='ht'> |
− | SELECT | + | Im Beispiel wird ein Datum 7 Tage nach dem Datumswert in <code>whn</code> ermittelt. |
− | + | <source lang='sql' class='def e-ingres'> | |
+ | SELECT whn, whn + DATE('7 day') | ||
+ | FROM eclipse | ||
+ | </source> | ||
+ | <source lang='sql' class='def e-postgres'> | ||
+ | SELECT whn, whn+INTERVAL 7 DAY | ||
+ | FROM eclipse | ||
</source> | </source> | ||
− | + | <source lang='sql' class='def e-oracle'> | |
− | <source lang='sql' class=' | + | SELECT whn, whn+7 |
− | SELECT | + | FROM gisq.eclipse |
− | |||
</source> | </source> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<source lang='sql' class='def'> | <source lang='sql' class='def'> | ||
− | SELECT | + | SELECT whn, whn+7 |
− | + | FROM eclipse | |
− | |||
− | |||
− | |||
− | |||
− | |||
</source> | </source> | ||
</div> | </div> | ||
− | < | + | <p>Siehe auch</p> |
− | + | <ul> | |
− | + | <li>[[EXTRACT/de | Funktion EXTRACT]]</li> | |
− | + | <li>[[%2B_INTERVAL/de |Funktion + INTERVAL]]</li> | |
− | + | </ul> | |
− | |||
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </ | ||
− | + | {{Languages}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 17:18, 21 October 2012
d + i | ||
---|---|---|
DBMS | OK | Alternative |
Ingres | Nein | whn + date('7 day') |
MySQL | Ja | |
Oracle | Ja | |
PostgreSQL | Nein | d+ INTERVAL 'i DAY' |
SQL Server | Ja |
+ (dates)
d + i liefert ein Datum, das i Tage nach dem Datum d liegt.
DATE '2006-05-20' + 7 -> DATE '2006-05-27'
schema:gisq
Im Beispiel wird ein Datum 7 Tage nach dem Datumswert in whn
ermittelt.
SELECT whn, whn + DATE('7 day')
FROM eclipse
SELECT whn, whn+INTERVAL 7 DAY
FROM eclipse
SELECT whn, whn+7
FROM gisq.eclipse
SELECT whn, whn+7
FROM eclipse
Siehe auch
Language: | English • Deutsch |
---|