Does VS or SQL Management Studio have a GUI for creating SQL queries?

I came across this query:

UPDATE [dbo].[Products] SET [ProductName] = @ProductName, [SupplierID] = @SupplierID, [CategoryID] = @CategoryID, [QuantityPerUnit] = @QuantityPerUnit, [UnitPrice] = @UnitPrice, [UnitsInStock] = @UnitsInStock, [UnitsOnOrder] = @UnitsOnOrder, [ReorderLevel] = @ReorderLevel WHERE (([ProductID] = @Original_ProductID) AND ([ProductName] = @Original_ProductName) AND ([SupplierID] = @Original_SupplierID) AND ([CategoryID] = @Original_CategoryID) AND ([QuantityPerUnit] = @Original_QuantityPerUnit) AND ([UnitPrice] = @Original_UnitPrice) AND ([UnitsInStock] = @Original_UnitsInStock) AND ([UnitsOnOrder] = @Original_UnitsOnOrder) AND ([ReorderLevel] = @Original_ReorderLevel))

Open in new window

And it seems so detailed that I question whether it was generated by a human or a program. Does VS or SQL Management Studio have some GUI for creating SQL queries?
Who is Participating?
In SSMS when you select a table and right click you can choose also to have a script created for insert/update/select
NorieVBA ExpertCommented:
SMSS does, the Design Query Editor under Query.

Not sure about VS, it's got something but not sure if it's really a query editor.

By the way, I would think that SQL could have been 'generated' by a human using code they  created.

For example some sort of function that you pass the fields to and it returns the SQL, or at least part of it.

There might even be another function for the criteria part.
Jacques Bourgeois (James Burger)PresidentCommented:
There is also one in Visual Studio, but you need to create a Data Connection first.

If it is not already visible along the Toolbox, activate the Server Explorer from the View menu.

In the Server Explorer, right click on Data Connections, Add Connection et fill in the necessary information for a Microsoft SQL Server (SqlClient)  Data source.

Your database will appear in the Server Explorer, and from there, you have access to all the tools that a programmer could need. The tools specific to a DBA such as creating roles are not there, but those for the programmer are all there. You could even create a new database if needed. You can even link to the SQL Server Debugger so that you can step into your stored procedures to debug them as if they where methods.

Naturally, you need the proper rights on the server and the database.
NorieVBA ExpertCommented:

Knew it was something like that, just not used VS for that kind of thing recently.
NorieVBA ExpertCommented:
I thought the question was about SSMS or VS having a GUI, not shortcuts to generate queries?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.