金仓数据库兼容mysql中any_value函数:
create function coalesce_("anyelement","anyelement") returns "anyelement"
language sql as $$ select coalesce( $1,$2) $$;
create aggregate any_value("anyelement")(sfunc=coalesce_, stype="anyelement");
本文介绍了如何在金仓数据库中实现MySQL兼容的any_value函数,通过coalesce函数作为基础,创建了一个聚合函数any_value(),用于处理anyelement类型的值。
金仓数据库兼容mysql中any_value函数:
create function coalesce_("anyelement","anyelement") returns "anyelement"
language sql as $$ select coalesce( $1,$2) $$;
create aggregate any_value("anyelement")(sfunc=coalesce_, stype="anyelement");
1474
935

被折叠的 条评论
为什么被折叠?