CREATE OR REPLACE FUNCTION rowcount(tname VARCHAR2) RETURN NUMBER IS x NUMBER; stmt VARCHAR2(200); BEGIN stmt := 'select count(*) from '||tname; execute immediate stmt into x; return x; EXCEPTION WHEN NO_DATA_FOUND THEN RETURN 0; END;
when ever i run the anonymous plsql block, sql*plus request me enter the parameter input value
I have a variable value like customer_name='xxxcust & lt pvt'
please help me
Do i need to write in PL/SQL or is it possible in SQL query?