Checking out dbForge’s SQL Complete for SQL Server (Part 1)
Tags: devart, sqlserver, dbdevelopment
Published: 2022-06-30 14:36:21

**Installation**

You can get dbForge SQL Complete by clicking the _**Get Trial**_ button. If you go for the SQL Tools Professional Trial, it will also include the whole suite of SQL Server Management Studio extensions, which adds a whole lot of extra value.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oohqbxffepcofkhgqr7q.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d5btnyiaifbljzwug2hl.png)

_**Note:** SQL Complete is an add-in for SQL Server Management Studio, so I would recommend having the latest version installed, although if you have an older version (e.g. 2012, 2014), then it will probably work as well._

Since SQL Complete is not a stand-alone tool, the first thing you must do is open SQL Server Management Studio and establish a connection against a target SQL Server instance of your choosing. Once in there, you can fire up a new query window and start laying out a query, just to see what it does:

In my case, I’m currently connected to my database called “test2” which only has 1 table right now. As I’m writing my SELECT statement, you can see that SQL Complete is listing that table for me in the context menu, which is very helpful when your databases are flooded with dozens of objects.

Now, if you don’t want to type the whole name of the desired table, then you can simply select it and it will complete it within your query.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gocjg2tm8f3321q8tyh5.png)  

For demonstration purposes, I have created a new table called “table2” and re-tried writing the same SELECT statement again. However, this time I noticed that only “table1” was showing in the context menu; it showed only after I dropped the connection to the instance and re-established it, so that you are fully aware. As you can see in the screenshot, it is showing as expected.

There’s one additional detail that I would like to bring up, and it is that if you select a particular table with the arrow keys on your keyboard, then it will list you all the fields with their respective data types. It will also tell you which fields conform the Primary Key, and an estimate of the row count. That feature by itself is a massive productivity booster for all of us SQL Server DB Developers! 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pi38kx2tkjtw1oh0xftk.png) 

Just out of pure curiosity, I have created a third table called “table3” with 31 fields (1 id and 30 NVARCHAR fields) just to see how SQL Complete presents a wide table:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gyfzdruovxju6st0c81q.png)  

With my on-going curiosity, I want to try with an even wider table (61 fields) to see the behavior:

It will display as much as your screen can handle. It would be neat to include a scrollable view for the context menu for cases like this though, but I’m sure that the Devart team will address it if the demand for it is high enough because they are constantly improving their suite of tools for the greater good.

_*I would like to make a tiny pause here and take back what I mentioned earlier in regards to the need to re-establish a connection to the SQL Server instance so that my newly-created table would appear in the context menu. It turned out that after I created my tables “table3 and table4”, I got up from my seat for a few minutes, and when I got back, the tables were there, without the need for me to re-establish my connection._

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nx1nw04ot0pl0rg1gi03.png)  

Now let me move on to an INSERT statement to see what we get:

Interestingly enough, here you get a scrollable view for all the fields if you have wide tables! 
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2fl5sygwd1bc235bg836.png) 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/edfbcj21c1sdkf94pkbv.png) 

With that detail out of the way, I want you to notice that next to each field name there’s a white/unmarked checkbox, so if you start clicking them you will see how your INSERT statement is being completed for you (it’s just SQL Complete living up to its name ;) ):

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tfb5rwy9vs2i272faamh.png)  

Now, if you move on to the VALUES section of your INSERT statement and start filling in the values, then [SQL Intellisense](https://www.devart.com/dbforge/sql/sqlcomplete/) will indicate which column you are specifying the value for:

This visual feedback alone is worth every penny!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y8cqy769vet6e4togv3j.png)  

For the UPDATE statement you pretty much get the same treatment, as you are typing it you will be getting the help from SQL Complete to write a valid statement:
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k6ujy4fdj3q01651qd7v.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zmkt6pijh6obvtislt3h.png)
  
Moving to the DELETE statement, as soon as I enter the word DELETE, then I’m presented with 2 options:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kyvliqk4zzsvbfr41wj3.png)  

If I pick the “DeleteFrom” option, you will notice that SQL Complete will layout a full skeleton for a formal DELETE statement that you simply have to accommodate to your own case:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kvhlb7p5cg0g6ladbg5n.png)  

Moving on to a SELECT with a JOIN statement, this is what I’m able to see when I reach the part where I have to specify the fields to perform the match:

As you can see, it is suggesting to me that the JOIN can be done using the id fields of both tables, and it will also show the participating tables along with their respective fields.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ykjklz68fevoq2yxpln.png)  

Moving on to the last section of this article, I want to show you a feature that SQL Complete also has baked in. If you right-click on any database, you will see a section called “SQL Complete” and then an option called “Find Invalid Objects”:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/grzuzmrwallo00mmkr6i.png)  

After you click that option, you will see something like this:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rii70zuo8x0pmjjjja9z.png)  

If I hit the “Analyze” button or link, this is what I’ll get:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9xqrzzkmo3uwr3gtgten.png)  

For this particular demonstration, I have created on purpose a Stored Procedure that is trying to do something on a table that doesn’t exist within my “test2” database, just to show you that SQL Complete will not only let me know that there’s something wrong with my Stored Procedure, but it will also pin-point where the issue is. Once again, hats off to the Devart team! 

**Final thoughts**
●	I have definitely just shown you the surface of what SQL Complete has to offer, so if you’d like to dig deeper, then I highly recommend you check the [documentation center](https://docs.devart.com/sqlcomplete/) for even more information. I will continue with the coverage of SQL Complete in a second part so that the content is presented to you in a digestible format.

●	If your workflow revolves heavily around DB Development for SQL Server, then SQL Complete is definitely the tool to have to boost your productivity. 

●	SQL Complete is the perfect complement, whether you are an experienced senior or a not-so-experienced junior database developer.