http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_sql.htm#i996963
CREATE OR REPLACE PROCEDURE demo(salary IN NUMBER) AS
cursor_name INTEGER;
rows_processed INTEGER;
BEGIN
cursor_name := dbms_sql.open_cursor;
DBMS_SQL.PARSE(cursor_name, 'DELETE FROM emp WHERE sal > :x',
DBMS_SQL.NATIVE);
DBMS_SQL.BIND_VARIABLE(cursor_name, ':x', salary);
rows_processed := DBMS_SQL.EXECUTE(cursor_name);
DBMS_SQL.CLOSE_CURSOR(cursor_name);
EXCEPTION
WHEN OTHERS THEN
DBMS_SQL.CLOSE_CURSOR(cursor_name);
END;
The new FILTER clause in Aggregations
-
Oracle 26.1 introduces the new FILTER clause that can be used in
aggregations.
Thus, for example, *in a SUM aggregation you can use FILTER WHERE ...*
...
Acum o zi
Niciun comentariu:
Trimiteți un comentariu