Ways to set up Pl/sql developer

Source: Internet
Author: User
Tags beautifier first row

Pl/sql beautifier (pl/sql landscaping device)

PLD version 6 has the ability to format the DML code. Select part of the code in SQL window or program window (if you do not select the entire window), select Edit-> pl/sql beautifier in the menu to get the formatted code. For illegal DML statements or DDL statements, the PLD will prompt Pl/sql Beautifier could not parse text in the status bar below. By default, PLD will place each field of a DML statement on a separate line, which is not convenient to view. Choose Editàpl/sql beautifier Options in the menu, enter the Preferences window, select Edit, and enter the profile editing interface: Select DML in the tab bar, selected in the middle of the window, In the Insert and Update group box, select the Fit and click Save to save the configuration file to the PLD installation directory and click Close. Enter the location of the configuration file in the rules file and click OK to complete the configuration file switch. Then you can format the code so that each field is on one line as much as possible.

TNS Names

Menu Helpàsupport infoàtns Names, you can view Oracle's Tnsnames.ora.

Copy to Excel

Execute the SELECT statement in SQL window, after the result, right click on the data area, select Copy to Excel, you can copy the record of the data area to excel. But there are two points to note: First, field can not start with =, otherwise Excel will be mistaken for a function, and two, the number should not exceed 17 digits, otherwise the number of digits will be set to 0, but can be by adding ' to the number ' to make Excel think that the field is text, At the same time for the Numbe type of field in the database, it is best to use to_char output, otherwise it may appear abnormal

Pl/sql Developer Remember login password

In the use of Pl/sql developer, in order to work conveniently hope Pl/sql developer remember to login Oracle username and password;

Setup method: Pl/sql Developer 7.1.2->tools->preferences->oracle->logon History, "store History" is the default check, "Store With password ", you can log in again and remember to enter the password once. (I can't seem to.)

Execute a single SQL statement

When using Pl/sql Developer SQL window, press the F8 key, Pl/sql developer The default is to execute all of the SQL statements of the window, you need to set the mouse is the SQL statement, that is, execute the current SQL statement;

Set method: Pl/sql Developer 7.1.2-->tools->preferences-->window types, on the hook "AutoSelect Statement" can be.

Format SQL statements

When using Pl/sql Developer SQL window, sometimes the input of the SQL statement is too long or too messy, hope to be able to use a more general format words, so that looks good, or analysis;

How to: Select the SQL statement you want to format, and then click the Pl/sql beautifier button on the toolbar.

View Execution Plan

When using Pl/sql Developer SQL window, sometimes the efficiency of the input SQL statement, the analysis of the following table structure, how to improve the efficiency of the query, you can view the implementation plan provided by Oracle;

How to: Select the SQL statement you want to analyze, and then click the Explain Plan button (that is, the execution Schedule) of the toolbar, or press F5 directly.

Right-click menu

In Pl/sql Developer (hereinafter referred to as PLD) in each text editing window, such as SQL window,command window and Porgram window, right click on an object name, will pop up a menu containing the Action Object command, We call this the right button menu.

Object types can be tables, views, synonyms, stored procedures, and functions. Depending on the type of object, the pop-up menu is also different. Tables and views have features such as view, edit, Rename, Drop, Query data, and edit data. View and edit are viewing and modifying the table's structural information, such as fields, primary keys, indexes, constraints, and so on. Query data is equivalent to opening a new window and executing the SELECT * from table. Edit data is equivalent to opening a new window and executing the SELECT * from table for update. Stored procedures and functions have the test function and are checked to enter the debug state. Sometimes because the PLD recognition error, right click on the object does not come out the correct menu, can be in the object of the DDL or DML statement before, plus a semicolon, so that the PLD can correctly determine the type of object

Select for Update

Sometimes we need to import some data into the database, if we use UE to insert statements, it will be more cumbersome and not very operational. PLD SQL window can query, add, modify, and delete the contents of the table. Query from needless to say, and new, delete and modify, simply add a for update after the SELECT statement, row-level lock on the table, and then click on the window lock icon, you can enter the editing state. Here's how to extract text from Excel to insert into a database our Excel file has three columns: create a temporary table in the database: Create TABLE T1 (Cino varchar2), Contno varchar2 (MB), Loanno VARCHAR2 (100)) then enter select t1 for Update in SQL window and click on the lock mouse to enter edit state: Click the Input window of the first row with the mouse, then the PLD will deadlock for a few seconds, then you can see the cursor in the first line of the input box flashing, With the mouse to Cino, Contno, Loanno selected: Into Excel, the need to insert the contents of the database selected, and then switch to PLD, press CTRL + V: Click √, and then click the Commit button, the data submitted to the table T1, execute SELECT * FROM T1 can see the content.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.