How to use function overloading in Snowflake UDFs

How to use function overloading in Snowflake UDFs

User Defined Functions in Snowflake Video

You can watch the complete hands on video tutorial

Step-5: SQL Construct for Method Overloading


use role sysadmin;
use database ttips;
use schema udfs;


create or replace function add_numbers(x number, y number)
    returns number
    as
    $$ 
      select x+y
    $$;

create or replace function add_numbers(x varchar, y varchar)
returns varchar
as
$$
    select x||y
$$;
    
    
select add_numbers(5,5),add_numbers('5','5');
        

All SQL Scripts - Part 01 to Part 09

  1. Part-02 User Defined Function in Snowflake SQLs
  2. Part-02 JavaScript & SQL User Defined Function in Snowflake SQLs
  3. Part-03 Strict Property User Defined Function in Snowflake SQLs
  4. Part-04 Not Null Return User Defined Function in Snowflake SQLs
  5. Part-05 Secure User Defined Function in Snowflake SQLs
  6. Part-06 Inbuilt Vs. User Defined Function in Snowflake SQLs
  7. Part-07 Table User Defined Function in Snowflake SQLs
  8. Part-08 Method Overloading SQL Script
  9. Part-09 Java User Defined Function SQL & Java Code