You are on page 1of 14

˜ 



 

|  
 |     
Obj
 

 
   b  b 
 
 D 
b    b    b
     
 ˜   
      
 DROP
TABLE    
 ˜   
      
 º ERT
º TO    

D-2 |  
 |     
U     
D  

 



 
h 
b     
  
h    
 
 

 b    
   b  
  

     b O
  

D-3 |  
 |     
C   

 

ELECT 'CREATE TABLE ' || table_name || '_test '


|| 'A ELECT * FROM ' || table_name
||' WHERE 1=2;'
A "Create Table ript"
FROM user_tables;

D-4 |  
 |     
C     

ET ECHO OFF


ET FEEDBACK OFF    b 
ET PAGEºE 0       !

POOL dropem.sql
  # $
POOL OFF
ET FEEDBACK ON
ET PAGEºE 4    b 
ET ECHO ON b
"   
  !

D-5 |  
 |     
 C   %


ET ECHO OFF


ET FEEDBACK OFF
ET PAGEºE 0

ELECT 'DROP TABLE ' || objet_name || ';'


FROM user_objets
WHERE objet_type = 'TABLE'
/

ET FEEDBACK O
ET PAGEºE 2
ET ECHO O

D-6 |  
 |     
D  C   b  &

ET HEADº G OFF ECHO OFF FEEDBACK OFF


ET PAGEºE 0

ELECT
'º ERT º TO departments_test VALUE
' || department_id || ', ''' || department_name ||
''', ''' || loation_id || ''');'
A "ºnsert tatements ript"
FROM departments
/

ET PAGEºE 2
ET HEADº G O ECHO O FEEDBACK O

D-7 |  
 |     
D  C   b  &


G 

'''X''' 'X'

'''' '

''''||department_name||'''' 'Administration'

''', ''' ','

''');' ');

D-8 |  
 |     
   D 
% 


COLUM my_ol EW_VALUE dyn_where_lause

ELECT DECODE'&&deptno', null,


DECODE '&&hiredate', null, ' ',
'WHERE hire_date=TO_DATE'''||'&&hiredate'',''DD-MO -YYYY'')'),
DECODE '&&hiredate', null,
'WHERE department_id = ' || '&&deptno',
'WHERE department_id = ' || '&&deptno' ||
' A D hire_date = TO_DATE'''||'&&hiredate'',''DD-MO -YYYY'')'))
A my_ol FROM dual;

ELECT last_name FROM employees &dyn_where_lause;

D-9 |  
 |     
ü  

D-10 |  
 |     
 

     



 '
    
      

 !

       
 !
 '

     !

D-11 |  
 |     
%

DO  




   

 ˜  
  
b   
   
   b 
 ˜  
  "     

D-12 |  
 |     
ü  

D-13 |  
 |     
ü  

D-14 |  
 |