YEAR/de

From SQLZOO
< YEAR
Revision as of 21:41, 21 October 2012 by Peter (Talk | contribs) (Created page with "Category:Deutsch <table align='right' border='1'> <caption>Kompatibilität</caption> <tr><th colspan='3'>YEAR(d)</th></tr> <tr><td align='center'>'''DBMS'''</td><td align=...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Kompatibilität
YEAR(d)
DBMSOKAlternative
IngresJa EXTRACT(YEAR from d)
MySQLJa EXTRACT(YEAR from d)
OracleNein TO_CHAR(d,'YYYY')
PostgreSQLNein EXTRACT(YEAR from d)
SQL ServerJa DATEPART(YEAR,d)

YEAR

YEAR ermittelt das Jahr aus einem Datumswert.

   YEAR(d)

In diesem Beispiel wird das Jahr aus dem whn-Datum ermittelt.

SELECT EXTRACT(YEAR FROM whn) AS v
      ,whn
      ,wht
  FROM eclipse
SELECT TO_CHAR(whn,'YEAR') AS v
      ,whn
      ,wht
  FROM gisq.eclipse
SELECT YEAR(whn) AS v, whn, wht
  FROM eclipse

Siehe auch

Sprache: English  • Deutsch