PL/SQL development and use experience-Li Ge summary

Preface: PL software, as the support software of Oracle, is widely used in relational databases and is a good helper written in SQL language. Based on this, the author combined more than ten years of development experience to sort out the main points, difficulties and handling methods in use. If there is a great god who has better suggestions, please ask the Fang family for advice and make progress together.

  • Hello World

declare

    msg varchar2(20):='Hello  world!'

 

begin

       dbms_output.put_line(msg);

 

exception

end;

  • Basic grammar

PL is a block structure language, each block is composed of three fixed sub-modules.

DECLARE statement: The function is to limit the variables, cursors, subroutines and other elements used.

BEGIN execute command: begin begin, end end. Can be empty, the embedded code is the core of the execution program.

Exception handling: optional.

; End statements can be nested within each other.

 

  • Installation and configuration
  1. Focus on the key points and hit the blackboard: Before using PL, you must first install Oracle database or Server
  2. Older installation packages need to configure environment variables.
  3. Oracle monitoring must be installed

 

  • Shortcut key settings

4.1 New SQL window: Ctrl+Shift+S

4.2 New command window: Ctrl+Shift+C

4.3 New test window: Ctrl+Shift+T

4.4 Redo: Ctrl +Shift+S

4.5 Cancellation: Ctrl+Z

4.6 Select all: Ctrl+A

4.7 Indentation: TAB

4.8 Uppercase: Ctrl+Shift+X

4.9 Lowercase: Ctrl+shift+Y

Execute a single SQL statement: F8

 

  • Debug shortcut keys:

5.1 Switch breakpoint: Ctrl+B

5.2 Start: F9

5.3 Run: Ctrl+R

5.4 Single step entry: Ctrl+N

5.5 Single step skip: Ctrl+O

5.6 Single step exit: Ctrl+T

5.7 Abnormal operation: Ctrl+Y

 

Conclusion: As a development tool, there is no other way to improve your proficiency, just practice more. Accumulate the use of various project codes. In practical applications, PL is mainly used for the modification and compilation of Oracle List. Explore more, sum up all kinds of experience and skills, and develop your potential.

 

Guess you like

Origin blog.csdn.net/weixin_45806384/article/details/109157466