CREATE TABLE account1 (
account_id INT,
name VARCHAR2(20)
);
INSERT INTO account1 VALUES ( 1, 'Bob' );
CREATE OR REPLACE FUNCTION get_accounts(
Acc_id IN Account1.account_id%TYPE
) RETURN account1%ROWTYPE
AS
l_cust_record account1%ROWTYPE;
BEGIN
SELECT *
INTO l_cust_record
FROM account1
WHERE account_id = Acc_id;
RETURN l_cust_record;
END;
/