Reading Time: 2 minutesThe SQL Server IN clause is a very helpful tool we can use to simplify our queries. In this very brief tutorial, we’ll discuss how the IN clause works and provide examples of it’s use. Take the following Books table: What if we wanted to write a query where we Continue Reading
The Top 7 SQL Server Best Practices You Should Follow!
Reading Time: 8 minutesIf you are in the process of learning how to query and develop SQL Server databases, congratulations, you are learning a skill that is extremely valuable in today’s data driven climate. There are many great tools you can use when it comes to querying and developing Microsoft SQL Server databases, Continue Reading
How to break a WHILE loop in SQL Server: Explained with Examples
Reading Time: 2 minutesThe task of breaking a WHILE loop in Microsoft SQL Server is very simple. We basically break a while loop when we want to terminate the loop early. That is, earlier than the loop would have ended if left to it’s natural progression. To break a WHILE loop early, just Continue Reading
SQL Server Triggers: The Ultimate Guide for Beginners
Reading Time: 13 minutesSQL Server Triggers are some of the most helpful objects available to us in Microsoft SQL Server. A proper understanding of triggers is essential if you are looking to enter the field of database design and development. In this tutorial, we’ll discuss everything you need to know about triggers in Continue Reading
How to find a string within a string in SQL Server: Explained with Examples
Reading Time: 5 minutesThe task of finding a character string within a larger character string in a SQL Server database is very easy. SQL Server has many built-in system functions that can be used for character string manipulation, one of which is the CHARINDEX function. We use the CHARINDEX system function to locate Continue Reading
How to drop a constraint in SQL Server: Explained with Examples
Reading Time: 4 minutesIt’s very easy to drop a constraint on a column in a table. This is something you might need to do if you find yourself needing to drop the column, for example. SQL Server simply will not let you drop a column if that column has any kind of constraint Continue Reading
How to drop a column in SQL Server: Explained with Examples
Reading Time: 4 minutesKnowing how to make modifications to the definition of a table is very important when it comes to developing Microsoft SQL Server databases. The task of deleting a column is very straightforward. In this very brief tutorial, we’ll discuss how to drop a column from a Microsoft SQL Server table. Continue Reading
How to Find Text in a SQL Server Stored Procedure: Just run this one query!
Reading Time: 4 minutesThere might be times when you simply need to search through the objects in a SQL Server database for a specific word or text. It would be a very tedious task to open each stored procedure, function, View, etc. and look through each to see if it references the text Continue Reading
What does “SET NOCOUNT ON” do in SQL Server? Explained!
Reading Time: 5 minutesMaybe you’ve been working with SQL Server for a while and have seen “SET NOCOUNT ON” here and there, but you aren’t really sure what it does. It’s usually seen within stored procedures, but it can be used anywhere. In this very brief tutorial, we’ll discuss what the SET NOCOUNT Continue Reading
How to find foreign key references in SQL Server: Just run this one query!
Reading Time: 4 minutesSQL Server foreign key constraints are one of the most useful tools available to us for maintaining the integrity of our data. If you want to find all the foreign key references in your database, there is a very simple query you can run. Just query the sys.foreign_keys and sys.foreign_key_columns Continue Reading