In this post:
I’ve been using Visual Studio for years, but I just learned something new that’s been around since at least Visual Studio 2005. It has a built in Transact-SQL Editor that you can use to write and execute SQL queries. From what I can tell, it looks like a component of SQL Server Management Studio 2008. You can access it from the Transact-SQL option in the Data menu, which opens the editor in a new tab.