home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a524 / 37.ddi / demo / demo1.sql < prev    next >
Encoding:
Text File  |  1991-03-04  |  1.3 KB  |  57 lines

  1. rem
  2. rem $Header: demo1.sql,v 6.1 90/02/16 18:39:56 nsalah Exp $ demo1.sql Copyr (c) 1989 Oracle
  3. rem
  4. rem V6PLS10030,DISK$DEV2:[PLS1FREEZE.DEMO.10030]
  5. /*         SCRIPT: DEMO1                                        */
  6. /* Shows use of variables, constants, and conditional control within */
  7. /* a PL/SQL procedure.                                               */
  8.  
  9. set termout off
  10. START load_inv
  11. delete from purchase_record;
  12. commit;
  13. set termout on
  14.  
  15. prompt >>>>>  Here's our inventory table:
  16. prompt >>>>>  (Note: there are 3 tennis racquets in stock)
  17. select * from inventory_table;
  18.  
  19. prompt >>>>>  Here's our purchase record, which is currently empty:
  20. select * from purchase_record;
  21.  
  22. prompt
  23. prompt >>>>>  Hit return to load our PL/SQL procedure that purchases
  24. prompt >>>>>  tennis racquets (part number 1234)...
  25. pause
  26.  
  27. GET demo1_pls
  28. .
  29.  
  30. prompt
  31. prompt >>>>>  Hit return to run this procedure 3 times...
  32. pause
  33.  
  34. START demo1_pls
  35. /
  36. START demo1_pls
  37. /
  38. START demo1_pls
  39. /
  40.  
  41. prompt >>>>>  Hit return to look again at our inventory table
  42. prompt >>>>>  and our purchase record...
  43. pause
  44.  
  45. select * from inventory_table;
  46. select * from purchase_record;
  47.  
  48. prompt >>>>>  Hit return to run our PL/SQL procedure one more time
  49. prompt >>>>>  and then take another look at our tables...
  50. pause
  51.  
  52. START demo1_pls
  53. /
  54.  
  55. select * from inventory_table;
  56. select * from purchase_record;
  57.