SI Object Browser tips

Source: Internet
Author: User

(1) SQL compilation and debugging

The latest version of SI Object Browser V12 provides a GUI for all Chinese characters.

First, we use the "graphic compiler" function to create such an SQL statement.

Example: [select Department table. department Code, Department table. department name, employee table. employee code, employee table. employee name, employee table, employee birthday from department table, employee table where employee table. department code = Department table. department Code where employee table. delete the table with ID = 0 order. department Code, employee table. employee code, employee table. employee birthday desc ].

In the preceding example, a letter or a letter is used to search for a table name or field name, and the "graphic editor" function of SI Object Browser is used, this SQL statement is instantly available. The procedure is shown in.



1. Select the Department table and employee table, and click "select". In the graphic editing area, the objects of the two tables are displayed and all fields are listed.
2. In this case, we can define an alias for A table in the table object, Department table as A, and employee table as B.
3. Drag the mouse to define the table relationship between the department table and the employee table. Select DEPPART_CD in Table A and drag it to DEPART_CD in table B. By default, the two fields are equal. To change them to greater than or less than other relationships, you can double-click the equal sign to define them.
4. Double-click the field in the table object to add the select item.





Click "execute" to display the query result. The processing time is displayed at the bottom.
Next, let's take a look at what we can do with the query results?



In actual development projects, many people may encounter too many query items, which leads to a field to be searched and pulled from the scroll bar... Very difficult. Click the second button on the left to change the output direction... This is much easier!



Another problem during SQL debugging is that many SQL Execution windows have been opened, and you can find them again after they are turned off... ObjectBrowser forcibly saves executed SQL statements in the history. Click "History" to view



Sometimes our SQL statement is too large and execution efficiency is very low. We need to check the "Execution Plan" of the SQL statement ".



For SQL debugging, developers often encounter many small problems. Although it is easy to solve, it usually takes some unnecessary time.

For example, if you want to copy all select projects, but SQL statements are written vertically, what should you do? The general practice is to copy the SQL statement to the text editor. The right-click menu of Object Browser, "matrix selection mode", can be directly implemented.

For another example, I don't know who writes SQL statements with mixed upper and lower cases. It's really not a good rule! To be unified, use other text editors... In the context menu of Object Browser, you can convert the selected SQL statements to uppercase or lowercase. For example, do we often press enter several minutes in a row, delete two times back, right, press enter, delete two times back, right .... And other repetitive work? This is because oracle tools do not provide macro functions. The Macro function in the context menu of Object Browser can help you.



In the old version of Object Browser, only one SQL statement can be executed at a time, which is common to many users. This new version provides "simultaneous execution of Multiple SQL statements", which makes up for ob's previous shortcomings. In addition, the "execute only selected SQL" function also keeps up. By the way, there are also "shortcut keys for batch comments...






Related Article

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.