Adding more conditions14) Right click on the Create Where Clause tab’s area and choose the Add Condition option16) Nesting conditions: The great feature of the WHERE clause is the nesting option, right click on the operational condition and a menu will pop up asking to insert a condition.Viewing resultsKansas State UniversityDepartment of Computing andInformation Sciences Query Builder Usage in Oracle SQLDeveloperSruthi NagulavanchaCIS 764: Database DesignInstructor: Dr. William J. HankleyDec 2008PurposeThis tutorial demonstrates a step by step procedure for Query building for all the noviceSQL programmers using SQL Developer. SQL Developer is a free tool from Oraclewhich is great for database querying and extraction and the finest thing is that it doesn’tjust support Oracle it also supports Access, MySQL and SQL Server. PrerequisitesBefore starting the tutorial, one should check for the following prerequisites. Oracle 10g has to be installed. SQL Developer has to be installed. SQL Developer is a free tool and it can bedownloaded from the following link :http://www.oracle.com/technology/products/database/sql_developer/index.htmlTutorial Layout1) Opening up a Blank SQL Worksheet2) Click on the icon found on the toolbar at the top, then select a connection you would like to build your query on. In the tutorial illustration the query has been built on a connection called sruthiNow a new tab appears which would be labeled with the name of the connection.3) Next right click in the area where the SQL query is typed and select the Query option.4) Query Builder window is as shown belowBuilding a QueryThe query could possibly be built in two different sections:- SELECT Columns Tab : Where the SELECT part of the statement is built- Create Where Clause Tab : Where the WHERE part of the statement is builtSelect Columns5) Drag and drop a table from the left hand side pane to the right hand side area, the table should now appear in the right hand side area along with the columns available.6) click on the check boxes next to the columns to select which colums are needed in the SELECT statement or click on the check box available at the top to select all columns (or *)7) To join SRUTHI_TABLE1 with SRUTHI_TABLE2 drag and drop second table onto the same area. Then drag and drop a column onto the other column for which the join operation have to be performed.8) Once the link is dropped, a join has been completed,only one field COMPANY is selected from the second table SRUTHI_TABLE2..9) Properties of the join can be changed by right clicking on it and selecting one of the options available10) Now we should be able to see what the SELECT part of our SQL statement looks like, click on the Show SQL tab.Where Clause creation11) Click on the Create Where Clause, there are three parts to this blank WHERE clause:12) The WHERE clause is created as follows:13) SQL statement after WHERE clause creation:Adding more conditions14) Right click on the Create Where Clause tab’s area and choose the Add Condition option15) After adding a second condition, a conditional operator drop down box will appear onthe left hand side and there are four different conditional options available:16) Nesting conditions: The great feature of the WHERE clause is the nesting option, right click on the operational condition and a menu will pop up asking to insert a condition.17) After inserting OR conditionViewing results18) To see what the final output of the SQL statements, click on the View Results tab andthen click on the Green play button.19) The view of the Table SRUTHI_TABLE1 stored in ORACLE 10g Database:20) The view of the Table SRUTHI_TABLE2 stored in ORACLE 10g
View Full Document