1. w3schools.com
        THE WORLD'S LARGEST WEB DEVELOPER SITE

        SQL Tutorial

        SQL HOMESQL IntroSQL SyntaxSQL SelectSQL Select DistinctSQL WhereSQL And, Or, NotSQL Order BySQL Insert IntoSQL Null ValuesSQL UpdateSQL DeleteSQL Select TopSQL Min and MaxSQL Count, Avg, SumSQL LikeSQL WildcardsSQL InSQL BetweenSQL AliasesSQL JoinsSQL Inner JoinSQL Left JoinSQL Right JoinSQL Full JoinSQL Self JoinSQL UnionSQL Group BySQL HavingSQL ExistsSQL Any, AllSQL Select IntoSQL Insert Into SelectSQL CaseSQL Null FunctionsSQL Stored ProceduresSQL Comments

        SQL Database

        SQL Create DBSQL Drop DBSQL Backup DBSQL Create TableSQL Drop TableSQL Alter TableSQL ConstraintsSQL Not NullSQL UniqueSQL Primary KeySQL Foreign KeySQL CheckSQL DefaultSQL IndexSQL Auto IncrementSQL DatesSQL ViewsSQL InjectionSQL Hosting

        SQL References

        SQL KeywordsMySQL FunctionsSQL Server FunctionsMS Access FunctionsSQL OperatorsSQL Data TypesSQL Quick Ref

        SQL Examples

        SQL ExamplesSQL QuizSQL ExercisesSQL Certificate

        MySQL YEAR() Function

        ❮ MySQL Functions

        Example

        Return the year part of a date:

        SELECT YEAR("2017-06-15");
        Try it Yourself »

        Definition and Usage

        The YEAR() function returns the year part for a given date (a number from 1000 to 9999).

        Syntax

        YEAR(date)

        Parameter Values

        Parameter Description
        date Required.  The date/datetime to extract the year from

        Technical Details

        Works in: From MySQL 4.0

        More Examples

        Example

        Return the year part of a date:

        SELECT YEAR("2017-06-15 09:34:21");
        Try it Yourself »

        Example

        Return the year part of the current system date:

        SELECT YEAR(CURDATE());
        Try it Yourself »

        ❮ MySQL Functions

          1. http://www.req0jcnn.tw | http://m.req0jcnn.tw | http://wap.req0jcnn.tw | http://3g.req0jcnn.tw | http://4g.req0jcnn.tw | http://5g.req0jcnn.tw | http://mobile.req0jcnn.tw | http://vip.req0jcnn.tw | http://ios.req0jcnn.tw | http://anzhuo.req0jcnn.tw | http://b148.req0jcnn.tw | http://2b51c.req0jcnn.tw | http://e4.req0jcnn.tw | http://e84.req0jcnn.tw | http://8d433.req0jcnn.tw | http://28.req0jcnn.tw | 硬汉出征阿浩