Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

PL/SQL Developer skills, keyboard shortcuts

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Class SQL PLUS window: File- > New- > Command Window, this client-side tool sql plus is similar to oracle, but much easier to use.

2. Set the keyword to capitalize automatically: Tools- > Preferences- > Editor, and select Uppercase for Keyword case. In this way, when you enter a sql statement in the window, the keyword is automatically uppercase, while the rest is lowercase. In this way, it is easier to read the code and maintain a good coding style. Similarly, in Tools- > Preferences- > Code Assistant (assistant), you can set the delay time of the code prompt, the prompt when entering a few characters, the uppercase, lowercase of the database object, the uppercase of the first letter, etc.

3. View the execution plan: select the SQL statement to be analyzed, then click the Explain plan button on the toolbar (that is, the execution plan), or press F5 directly. This is mainly used to analyze the execution efficiency of SQL statements and the structure of the table, so as to provide an intuitive basis for sql tuning.

4, automatic replacement: quickly enter SQL statements, such as enter s, press the space, automatically replace with SELECT; and then, for example, enter sf, press the space, and automatically replace SELECT * FROM, which is very convenient and saves a lot of time to write repeated SQL statements.

Setting method: menu Tools- > Preferences- > Editor- > AutoReplace (automatic replacement)-> Edit

1) create a text file shortcuts.txt and write the following:

S=SELECT

Save the copied code to the ~ / PlugIns directory under the installation path of PL/SQL Developer

2), Tools- > Preferences- > User Interface- > Editor- > AutoReplace, select the Enable check box, then browse to the file to select the shortcuts.txt created earlier, and click Apply.

3) restart PL/SQL Developer, enter the s + space in the sql window, and test the sc+ space.

Note: shortcuts.txt cannot be deleted, otherwise shortcut keys cannot be used

Some rules are defined below as a reference

I=INSERT

U=UPDATE

S=SELECT

F=FROM

W=WHERE

O=ORDER BY

D=DELETE

Df=DELETE FROM

Sf=SELECT * FROM

Sc=SELECT COUNT (*) FROM

Sfu=SELECT * FROM FOR UPDATE

Cor=CREATE OR REPLACE

P=PROCEDURE

Fn=FUNCTION

T=TIGGER

V=VIEW

Sso=SET serveroutput ON

Set shortcut keys (setting method: menu Tools- > Preferences- > user interface-> key configuration)

Create a new sql window: ctrl+shift+s

Create a new command window: ctrl+shift+c

Create a new test window: ctrl+shift+t

PL/SQL Developer Beautifier: ctrl+shift+f

Redo: ctrl+shift+z

Undo: ctrl+z

Clear: ctrl+d (use with caution, can not be recovered, I am disabled O (∩ _ ∩) O ~)

Check all: ctrl+a

Indent: tab

Unindent: shift+tab

Capital case: ctrl+shift+x

Lowercase: ctrl+shift+y

Note: ctrl+h

Uncomment: ctrl+m

Find: ctrl+f

Display table structure: ctrl+ mouse over the table name

Template list: shift+alt+r

Window list: ctrl+w

5. Execute a single SQL statement: press F8

6. TNS Names: menu Help- > Support Info (support information)-> TNS Names, you can view the tnsnames.ora of Oracle

7. Debug stored procedures

When using PL/SQL Developer to operate Oracle, some stored procedures are sometimes called or debugged.

The method of calling the stored procedure:

1) first, select Procedures in the Browser to the left of the PL/SQL Developer to find the stored procedure to be called

2) then, select the debugged stored procedure, right-click, and select Test. In the pop-up Test scrresolpt window, you need to input a value to the Value of the parameter defined as in. Finally, click the number of buttons above: Start debugger or press F9.

3), finally click: RUN or Ctrl+R.

Debug shortcut key

Toggle breakpoint: ctrl+b

Start: f9

Run: ctrl+r

Step into: ctrl+n

Skip step: ctrl+o

Step out: ctrl+t

Run to exception: ctrl+y

8. Template shortcut key

9. My Objects is automatically selected by default after login.

By default, All objects is selected in Brower after PLSQL Developer login. If you log in to dba, it normally takes Wait seconds to expand the tables directory, while the response rate is calculated in milliseconds after selecting My Objects.

Setting method:

Tools menu-> Brower Filters, will open the Brower Folders order window, set "My Objects" to the default.

Tools menu-> Brower Folders move several directories you often click on (such as Tables Views Seq Functions Procedures) a little higher, and add color distinction, so that your average time to find the table will be greatly shortened, give it a try.

Priority, from left to right

Tables- > Tablespaces- > Procedures- > Users- > Roles

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report