mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Add toYear MySQL compatibility alias
This commit is contained in:
parent
8f115f2923
commit
d7c5dd3767
@ -12,6 +12,8 @@ using FunctionToYear = FunctionDateOrDateTimeToSomething<DataTypeUInt16, ToYearI
|
||||
void registerFunctionToYear(FunctionFactory & factory)
|
||||
{
|
||||
factory.registerFunction<FunctionToYear>();
|
||||
/// MysQL compatibility alias.
|
||||
factory.registerFunction<FunctionToYear>("YEAR", FunctionFactory::CaseInsensitive);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
2016
|
@ -0,0 +1 @@
|
||||
SELECT YEAR(toDateTime('2016-06-15 23:00:00'));
|
Loading…
Reference in New Issue
Block a user