Oracle is not object-oriented by default and it will not pass a normal column as an object enhanced with metadata about itself. Without creating custom object types and variables and/or tables, columns and nested tables that use those custom object types, all the values you pass will be scalars. So, with a normal table you'd have to pass in not only the column value, but any attributes about that column you need (schema, table name, column name, etc.):
CREATE OR REPLACE FUNCTION myfunction (owner IN varchar2, table_name IN varchar2, column_name IN varchar2, column_value IN varchar2)
RETURN something
AS
BEGIN
-- do something with owner, table_Name, column_name and column_value
RETURN something
END;
/
SELECT myfunction('MYSCHEMA','MYTABLE','MYCOLUMN',mycolumn)
FROM myschema.mytable
Also, Oracle is hard-typed, so if you want a generic function you'll need to create overloads (multiple definitions in a package with the same function name) for different possible datatypes of my_column/column_value
. One for strings, one for numbers, one for dates, etc..