Home » DB2 RazorSQL Query Builder

DB2 RazorSQL Query Builder

by Online Tutorials Library

DB2 RazorSQL QueryBuilder

Open RazorSQL and then connect to the database.

Now right click on the selected table. You will see query builder.

DB2 querybuilder

QueryBuilder can be used to SELECT, SEARCH, INSERT, UPDATE and DELETE purpose. You can use it for the above all operation to build query and execute it.


The SELECT option facilitates you to use all SELECT queries.

For example: You can use SELECT * for retrieving all records from the table as well as SELECT individual columns for retrieving individual records.


Retrieve All Records

Click on the SELECT * option to retrieve all records from the table. Now click on the generate SQL, you will see the generated query.

Click on the Execute SQL button.

DB2 querybuilder2

See the result on RazorSQL main page.

DB2 querybuilder3

You can use WHERE and GROUP BY clauses with SELECT Query. Conditions like <, >, <=, >=, =, <>, LIKE, NOT LIKE can also be used.

For example:

Let’s select address from the table “Freshers” Where address is LIKE “Allahabad”.

DB2 querybuilder5 DB2 querybuilder6

In the same way you can retrieve individual records.


The next option of the Query Builder is search query. You can retrieve records from the table “Fresher” by using this query method.

Let’s retrieve records from the table “Freshers” Where address != Allahabad and ID is greater than 1.

DB2 querybuilder7


You can insert a single record as well as a complete row in the table by using INSERT block.

For example:

Let’s insert the following record as a new row.

DB2 querybuilder8 DB2 querybuilder10


Update block is used to update the already inserted records in the table. Let’s update the table where name is “Babita” and “Age” is 25 to name “Kiran” and age 45.

DB2 querybuilder11



DELETE block is used to delete a specified record.

Let’s delete the records from the table “Freshers” where id >= 4 AND age <= 30.

DB2 querybuilder13 DB2 querybuilder14

You can see that only id < 4 is remained in the table now.

Next TopicCompare Tool

You may also like