Vous êtes sur la page 1sur 3

1) Please provide an example of a SQL script which includes selection of data from more than one table, and

includes an outer join on a multiple column foreign key. Example 1: Let's we suppose that we have 3 tables Table X , with column a primary key Table Y , with column b primary key Table Z , with column a foreign key references to column a in table X and column b foreign key references to column b in table Y to make SELECT include outer join between tables select z.a,z.b from x,y,z where z.a=x.a(+) and z.b=y.b(+)

Example 2 : In this example we show (Left Outer Join ,Right Outer Join ) Let 's we suppose that we have 2 tables Table X , with column a primary key ,and other columns Table Z , with column a foreign key references to column a in table X , and other columns Right Outer Join select x .a,z.a from x,z where x.a=z.a(+) Left Outer Join select x .a,z.a from x,z where x.a(+)=z.a 2) Please provide an example of a SQL script to create a primary key constraint on a table with its corresponding index storage definition. Let's suppose that table Q need to add a prinary key (column a) ALTER TABLE Q ADD (CONSTRAINT Q_PK PRIMARY KEY (a) USING INDEX STORAGE (INITIAL 64K NEXT MINEXTENTS MAXEXTENTS 1 2000000 64K

PCTINCREASE

50 ));

3) Please provide an example of a PL/SQL script which exemplifies the most efficient use of the FOR...LOOP logic while working with a cursor. We use table scott.emp declare cursor get_1 is select empno,ename from emp; begin for i in get_1 loop dbms_output.put_line(i.empno||' - '||i.ename); end loop; end; / 4) What type of Oracle Forms trigger is best suited for populating foreign key lookup values when querying records? POST-QUERY 5) Please provide a brief overview of how to create a dynamic list item in Oracle Forms. We suppose that we make scott.emp list item of column ename in table

name of the list item is : EMP_NAME In trigger WHEN-NEW-FORM-INSTANCE Example 1: declare cursor get_nm is select empno,ename from scott.emp; begin clear_list('EMP_NAME'); for x in get_nm loop add_list_element('EMP_NAME',1,x.ename,x.empno); end loop; end; Example 2: At first we make RECORDGROUP let's named and write the follwing select inside it : select ename,to_char(empno) from scott.emp then In trigger WHENNEW-FORM-INSTANCE declare

x number; begin x := populate_group ('R'); populate_list ('EMP_NAME' , 'R'); end; 6) Please provide a brief description of a specific application that you have worked on in a production environment using Oracle Forms or Oracle Reports. Developer 2000,6i,10g Developer 6i is the most product which I use it .

Vous aimerez peut-être aussi