Click here to Skip to main content
15,881,687 members
Articles / Programming Languages / T-SQL
Article

SQL Coding Productivity in Visual Studio Enterprise with SQL Prompt Core

22 Sep 2017CPOL3 min read 14.1K   2  
If you could gain an extra hour in your working day, what would you spend it on? One way to save time and work efficiently, is to use tools available at your fingertips. Learn how SQL Prompt Core, included free in Visual Studio Enterprise, helps you speed up working with SQL and be more productive.

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

Image 1

When Redgate posed this question to the SQL Server community, the results were unequivocal. Well over half the respondents wanted that time for either strategic development planning (32%) or proactive development (26%). An encouraging 18% would spend the hour in training or personal development, learning how to automate processes, and generally become better developers. The least popular answer in the poll was to spend the extra hour fixing more bugs (5%).

In other words, we want more time to work out how our applications can deliver maximum value to end users and to the business, more time to spend learning how to design effective databases, and less time firefighting the bugs and performance problems caused by poorly designed applications, databases and queries.

But how do you get back that precious extra hour in every day? If you're a .NET developer working in Visual Studio, you might easily gain this extra hour each day, just by making full use of the productivity tools already at your disposal.

Be a more productive SQL developer

All developers need to be specialists in their team's primary development language, but alongside specialists, an IT department needs people who are broadly skilled and versatile, who can be productive quickly on new projects, and with programming languages with which they are less adept, such as SQL.

SQL Prompt Core is an industry-leading SQL productivity tool, it's included free in Visual Studio Enterprise, and it's best known for giving you advanced, IntelliSense-style SQL code completion, but that’s not all…

Image 2

Write correct SQL queries in a flash

SQL Prompt Core autocompletes T-SQL commands and keywords, providing intelligent suggestions and prompts, as you type. Its auto-suggestions will allow you to pick very quickly the tables and columns from which you need data. If you can't remember the precise table names, for example, SQL Prompt Core offers suggestions based on the first characters you type, mid-string, or CamelCase.

Image 3

In the most simplistic case, it reduces the task of writing a SELECT statement to just a few keystrokes.

Of course, it's generally a bad practice to use wildcards in SELECT statements, so simply place your cursor after the SELECT *, hit tab, and SQL Prompt Core will replace the * with all the columns available in the table.

Even better, avoid the * altogether! Start typing the column name after SELECT then pick the columns you need from the Column Picker suggestions.

Image 4

SQL Prompt Core's auto-suggestions will also allow you to flesh out your WHERE, GROUP BY, and other clauses, as well as navigate much more easily through complex join conditions.

It will auto-suggest "join" tables, starting with any tables that have a FOREIGN KEY relationship to the first table. If there isn't a FOREIGN KEY, SQL Prompt Core suggests relevant JOIN conditions based on column similarities, such as an EmailAddress or Username column present in both tables.

Image 5

Once you've written your T-SQL query, stored procedure or function, you'll want to test it. SQL Prompt Core autocompletes EXEC statements too. It'll pick up where there’s a parameter that needs to be parsed, and prompt you to add it before executing.

Image 6

SQL Prompt Core also makes it quick and easy to write INSERT statements, for example, by providing placeholders for all column names so you can quickly see the values you need to input to complete the statement.

 Image 7

It's easy to get lost in the nuance of SQL syntax and spend hours stumbling around technical documentation trying to work out where you're erred. SQL Prompt Core will guide you much more smoothly through the syntactical choices, deepening your knowledge of how SQL works while you're working through the code.

How to get started

As a Visual Studio Enterprise user, you can install SQL Prompt Core as part of the Data storage & processing workload, or from the Visual Studio Marketplace.

To learn more, check out the 7-minute video walkthrough.

If you’re using Visual Studio Pro or Community editions, fear not! Get all this and so much more from SQL Prompt Pro with a free 28-day trial from Redgate.

Image 8

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Red Gate Software Ltd.
United Kingdom United Kingdom
Redgate makes ingeniously simple software used by 804,745 IT professionals and counting, and is the leading Microsoft SQL Server tools vendor. Our philosophy is to design highly usable, reliable tools which elegantly solve the problems developers and DBAs face every day, and help them adopt database DevOps. As a result, more than 100,000 companies use products in the Redgate SQL Toolbelt, including 91% of those in the Fortune 100.
This is a Organisation

1 members

Comments and Discussions

 
-- There are no messages in this forum --