A table function is a user-defined function that returns a collection (e.g., a table or an array) that can be queried like a table in SQL.
Syntax of a table function:
CREATE OR REPLACE FUNCTION function_name RETURN collection_type IS BEGIN RETURN result_collection; END;
A pipelined function is a specialized table function that returns rows incrementally (one by one or in small batches) instead of processing and returning the entire collection at once.