我们都知道oracle存储过程支持为参数设置默认值,这样即使存储过程升级,原来的调用也可以不受影响.但是mysql不支持,mariadb也没有支持(截止10.4也是如此).但是这一限制会导致升级麻烦重重.虽然如此,我们可以通过mysql 5.7/mariadb 10.2引入的json类型来变通实现.如下所示: drop function number_stats; CREATE FUNCTION number_stats(in_numbers JSON) RETURNS INTEGER NOT
[root@ ~]# mysql -h 192.168.0.* -uroot -pEnter password: Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 8174Server version: 5.1.73 Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All ri