IT Ninja Turtles PL/SQL Developer tips and shortcuts, Ninja Turtles developer
1. SQL plus Window: File-> New-> Command Window. This is similar to the SQL plus client tool of oracle, but it is much easier to use than it.
2. Set the Keyword to Uppercase automatically: Tools-> Preferences-> Editor, and select Uppercase for Keyword case. In this way, when an SQL statement is entered in the window, the keywords are automatically capitalized, while the others are all 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 code prompt Delay Time, the prompt when entering a few characters, the database object in upper case, lower case, the first letter in upper case;
3. view the execution plan: select the SQL statement to be analyzed, click the Explain plan button on the toolbar (that is, the execution plan), or press F5 directly. This is mainly used to analyze the SQL statement execution efficiency, the structure of the analysis table, which provides an intuitive basis for SQL optimization;
4. automatic replacement: enter an SQL statement quickly, for example, enter s, Press space, and replace it with SELECT. For example, enter sf, Press space, and replace it with SELECT * FROM, it 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 shortcuts.txt file and write the following content:
S = SELECT
Copy the code and save it to the installation path of PL/SQL Developer ~ /Under the PlugIns directory
2) Tools-> Preferences-> User Interface-> Editor-> autoreplace, select the enableoption, select the created shortcuts.txt in the browser file, and click Apply.
3) Restart PL/SQL Developer and enter s + space and SC + space in the SQL window for testing.
Note: The shortcuts.txt cannot be deleted, or the shortcut key cannot be used.
Some rules are defined as reference below
I = INSERT
U = UPDATE
S = SELECT
F = FROM
W = WHERE
O = ORDER
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 the shortcut key (setting method: menu Tools> Preferences> User Interface> key configuration)
New SQL window: ctrl + shift + s
New command window: ctrl + shift + c
New Test window: ctrl + shift + t
PL/SQL Developer beautify: ctrl + shift + f
Redo: ctrl + shift + z
Undo: ctrl + z
Clear: ctrl + d (use with caution and cannot be recovered. I disabled O (strong _ strong) O ~)
Select All: ctrl +
Indent: tab
Unindent: shift + tab
Uppercase: ctrl + shift + x
Lower case: ctrl + shift + y
Note: ctrl + h
Uncomment: ctrl + m
Search: ctrl + f
Display table structure: ctrl + hover the 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: Choose Help> Support Info> TNS Names to view tnsnames. ora of Oracle;
7. debug the Stored Procedure
When PL/SQL Developer is used to operate Oracle, some stored procedures are sometimes called or debugged;
Method for calling a stored procedure:
1) First, select Procedures in the Browser on the left of PL/SQL Developer to find the stored procedure to be called;
2) then, select the debugging stored procedure, right-click and select Test. in the displayed Test scr release pt window, for parameters defined as in, enter a Value for this parameter. Click Start debugger or press F9;
3) Click RUN or Ctrl + R.
Debugging shortcuts
Switch breakpoint: ctrl + B
Start: f9
Run: ctrl + r
Single Step: ctrl + n
Skip one step: ctrl + o
Exit in one step: ctrl + t
Run to exception: ctrl + y
8. template shortcut
9. My Objects is automatically selected by default after logon.
By default, after PLSQL Developer logs on, All objects will be selected in Brower. If the user you log on to is dba, it will take several seconds to expand the tables directory, after selecting My Objects, the response speed is calculated in milliseconds.
Setting method:
Tools menu-> Brower Filters. The order window of Brower Folders is opened, and "My Objects" is set as the default.
Tools menu-> In Brower Folders, move the directories (for example, Tables Views Seq Functions Procedures) You frequently clicked to the top and add colors to differentiate them, in this way, the average table searching time will be greatly shortened. Try again.
Priority, from left to right
Tables-> Tablespaces-> Procedures-> Users-> Roles
What are the shortcut keys for PL/SQL Developer to close the SQL window?
Preferences-> keyconfigration-> file/close and set your favorite buttons. (Ps: This close is the page that closes the current activity)
Ask pl SQL developer whether there is a shortcut key for me to place the cursor on which line, and then press the shortcut key to execute this line of SQL statement,
Set parameters to automatically select the SQL statement of the row where the cursor is located.
Tools-> preferences-> SQL window-> autoSelect Statement
Then press F8 to execute the row where the cursor is located.
Note that the row where the cursor is located must end with a; otherwise, an error is reported.