Home > DeveloperSection > Articles > Design Query in Editor SQL Server 2008 R2

Design Query in Editor SQL Server 2008 R2


Database Database 
Ratings:
2 Comment(s)
 7509  View(s)
Rate this:

Design Query in Editor SQL Server 2008 R2

In this Article I am going to teach how to design queries in Design Query Editor.

It is a graphical user interface (GUI) the Design Query Editor builds the queries to run against your SQL Server database. It can be especially useful when building compound queries that involves many tables and views.

Open Design Query Editor:-

1.       Go to on Query Menu and select Design Query in Editor… command.

 

Design Query in Editor SQL Server 2008 R2

 

2.       After clicking on Design Query in Editor… the below screen will appear.

 

Design Query in Editor SQL Server 2008 R2

 

Make Select Query:-

1.       You can select table at least one below image I am selecting a table which name is tblEmployee.

 

Design Query in Editor SQL Server 2008 R2

 

2.       And then you can click on Add button to add the table for make a select query.

3.       After selecting or add the table clicks on close button to close the Add Table dialog box and after that below screen will appear.

 

Design Query in Editor SQL Server 2008 R2

 

Above image I am selecting two columns of table first is vEmpName and second is vEmpContact, and you can see below your selected columns and select query and then press OK.

 

4.       After pressing OK you can see the select query on your screen.

SELECT     vEmpName, vEmpContact

FROM         tblEmployee

Output:

            Design Query in Editor SQL Server 2008 R2

Make Insert Query:-

You can also design insert query through Query designer:-

1.       You can do same as previous steps select the table which you want to insert the value and then you need to select the columns and then right click on the column and select the Change Type>>Insert Values.

 

Design Query in Editor SQL Server 2008 R2

 

2.       After that you can insert the values in the columns.

 

Design Query in Editor SQL Server 2008 R2

 

3.       After that press OK button and insert query will be appear on your screen.

INSERT INTO tblEmployee

                      (iEmpId, vEmpName, vEmpContact)

VALUES     (6,'Arun','+91-9865734586')

Now you can see your table:

select * from tblEmployee

Design Query in Editor SQL Server 2008 R2

Create an Update query through Query Designer:

Now here also you can go on Query Menu and select Design Query in Editor… command and select the table which you want to update your table.

1.        For make update query you can also add a table then right click on the columns and select the change type >> update.

Design Query in Editor SQL Server 2008 R2

2.       After that you can select desired column and then insert the value.

  Above image I am selecting firstly column name which is vEmpName second select the table then enter New Value (I am inserting the ‘Avadesh’) and after that select the column again (vEmpId) for filtering the insert value and then press OK.

            Design Query in Editor SQL Server 2008 R2

3.       After that you can see update query will appear on your screen.

UPDATE    tblEmployee

SET              vEmpName = 'Avadesh'

WHERE     (iEmpId = 6)

Design Query in Editor SQL Server 2008 R2

Above image you can see your row updated.

Create a Delete query through Query Designer:

You can make delete query same as update query through Query Designer.

1.       Go to on the Query Menu and select Design Query in Editor… and select the table.

2.       Now right click on the column go to Change Type>>Delete.

3.       Select the Column name and next select table and then enter the value in filter.

4.       After that press OK.

5.       Now you will see the query on your screen.


really, this is very helpful article

By AVADHESH PATEL on   3 years ago
Hi Vijay!

"Design Query in Editor SQL Server 2008 R2" article is very helpful for me. Can you provide more demo in this topic?
I will be waiting!

asking for help

By satyajit patra on   3 years ago
i dont have Design Query in Editor option in Query Menu
plz help me .....

Don't want to miss updates? Please click the below button!

Follow MindStick