background preloader

Oracle

Facebook Twitter

Oracle database 11g: the complete ... Overview of PL/SQL. The limits of my language mean the limits of my world.

Overview of PL/SQL

--Ludwig Wittgenstein This chapter surveys the main features of PL/SQL and points out the advantages they offer. It also acquaints you with the basic concepts behind PL/SQL and the general appearance of PL/SQL programs. You see how PL/SQL bridges the gap between database technology and procedural programming languages. This chapter discusses the following topics: Understanding the Main Features of PL/SQL PL/SQL Architecture Advantages of PL/SQL Understanding the Main Features of PL/SQL A good way to get acquainted with PL/SQL is to look at a sample program. With PL/SQL, you can use SQL statements to manipulate Oracle data and flow-of-control statements to process the data. Block Structure PL/SQL is a block-structured language. A block (or sub-block) lets you group logically related declarations and statements. As Figure 1-1 shows, a PL/SQL block has three parts: a declarative part, an executable part, and an exception-handling part.

PSOUG.org - Oracle PL/SQL Database Code Library and Resources. The Oracle (tm) Users' Co-operative FAQ - Privileges. The Oracle (tm) Users' Co-Operative FAQ How do I find out which users have the rights, or privileges, to access a given object ?

The Oracle (tm) Users' Co-operative FAQ - Privileges

Back to index of questions Information on user object and system access privileges is contained in the rdbms data dictionary tables. For this specific question the most likely dictionary table of interest is DBA_TAB_PRIVS: Name Null? A description of the column values in available in the Oracle 8i Reference manual, but they should all be pretty obvious. Before continuing any farther I want to note that privileges are divided into two classes: user access or DML access privileges to Oracle objects (tables, indexes, views...) and system privileges (create session, create table, create user...). Privileges are issued with the GRANT command revoked with the REVOKE command. GRANT select, insert, update, delete, references ON my_table TO user_joe ; REVOKE insert, delete ON my_table FROM user_joe ; GRANT create public synonym TO user_joe ; Sample output: Back to top.

Working with REF CURSOR in PL/SQL - Oracle. All the examples in this series have been tested only with Oracle 10g (V10.2).

Working with REF CURSOR in PL/SQL - Oracle

I didn't really test any of the examples in any of the previous versions. If you have any problems during the execution of these examples, please post in the discussion area. Introduction to REF CURSOR A REF CURSOR is basically a data type. A variable created based on such a data type is generally called a cursor variable. Let us start with a small sub-program as follows: declare type r_cursor is REF CURSOR; c_emp r_cursor; en emp.ename%type;begin open c_emp for select ename from emp; loop fetch c_emp into en; exit when c_emp%notfound; dbms_output.put_line(en); end loop; close c_emp;end; Let me explain step by step.

PLSQL Topics: Functions (By Category) Chapter 14. Advanced Analytic SQL. Similar to the windowing functions described earlier, reporting functions allow the execution of various aggregate functions (MIN, MAX, SUM, COUNT, AVG, etc.) against a result set.

Chapter 14. Advanced Analytic SQL

Unlike windowing functions, however, the reporting functions cannot specify localized windows and thus generate the same result for each entire partition (or the entire result set, if no partitions are specified). Therefore, anything that can be accomplished using a reporting function can also be accomplished using a windowing function with an unbounded window, although it will generally be more efficient to use the reporting function. Earlier in the chapter, we used a windowing function with an unbounded reporting window to generate the total sales for the 12 months of 2001: The next query adds a reporting function to generate the same results: Reporting functions are useful when you need both detail and aggregate data (or different aggregation levels) to answer a business query. 14.4.1 Report Partitions.

XML in Oracle

Oracle Forms.