After completing this PL SQL tutorial, you will have a good understanding of the PL/SQL programming language. Let’s dive in!!! What Is PL/SQL PL/SQL is a fusion of SQL with procedural traits of programming languages. It was launched by Oracle to upgrade the features of SQL. PL SQL i...
https://www.guru99.com/pl-sql-tutorials.html PL/SQL http://plsql-tutorial.com/ https://www.tutorialspoint.com/plsql/index.htm https://www.javatpoint.com/pl-sql-tutorial Thanks Raghav comparing SQL data from a single table how can I convert a cursor to an alternative faster query...
--- store empno, ename from emp table thru cursor to pl/sql tables. declare type ty_plsql is record ( empno number, ename varchar2(50)); ty_plsql1 ty_plsql; cursor c is select empno,ename from emp; begin for i in c loop ty_plsql(i).empno := i.empno; ty_plsql(i).enam...
Lizbeth could simplify this code even further by using a cursor FOR loop. Since she is iterating through every row, she can avoid the record declaration entirely as follows: PROCEDURE show_excuses IS CURSOR quick_cur IS SELECT title, description FROM flimsy_excuses; BEGIN FOR l_record IN quic...
CURSOR c_stud_zip IS SELECT s.student_id, z.city FROM student s, zipcode z WHERE z.city = ‘Brooklyn’ AND s.zip = z.zip FOR UPDATE OF phone; BEGIN FOR r_stud_zip IN c_stud_zip LOOP DBMS_OUTPUT.PUT_LINE(r_stud_zip.student_id); ...
SQL> select count(distinct block#) from v$bh 2 where objd in (select data_object_id from dba_objects where object_name='PROBLEM_TABLE' and object_type like 'TABLE%'); COUNT(DISTINCTBLOCK#) --- 15260 So, table Size is small to fit in cache also Table is already in cache then Why ...