Reading Time: 6 minutesThe SQL IF EXISTS tool is great to know for managing the flow of control of your SQL code. In this very brief tutorial, we’ll discuss everything you need to know about the IF EXISTS decision structure in SQL Server. We’ll discuss these topics: What is the SQL IF EXISTS Continue Reading
The Basics
How to create a table variable in SQL Server
Reading Time: 4 minutesIn this very brief tutorial, we’ll discuss how you can create a table variable in Microsoft SQL Server. Knowing how to create a SQL Server table variable can be very useful when querying data in a database. It is very simple, and there are only a few rules you need Continue Reading
SQL Server GO: Explained with Examples
Reading Time: 6 minutesThe SQL Server GO keyword is extremely common when querying and developing SQL Server databases. It is important that you understand how it works if you regularly create objects (such as tables, stored procedures, views, etc.) in a SQL Server database. In this very brief tutorial, we will discuss everything Continue Reading
What’s the difference between VARCHAR and NVARCHAR? Answered!
Reading Time: 3 minutesThere are four character string data types in Microsoft SQL Server. They are: CHAR NCHAR VARCHAR NVARCHAR You should definitely choose the best character string data type to suit your needs. But you might look at VARCHAR and NVARCHAR and wonder, what’s the difference? Well, in this very brief tutorial Continue Reading
SQL Server REPLACE: Explained
Reading Time: 4 minutesThe SQL Server REPLACE function is a very simple system function that is built into Microsoft SQL Server. It is one of the best tools you can use for string manipulation in SQL Server. In this very brief tutorial, we’ll discuss the SQL Server REPLACE function and how to use Continue Reading
How to escape a single quote in SQL Server
Reading Time: 2 minutesSQL Server makes it very easy to escape a single quote when querying, inserting, updating or deleting data in a database. Here’s how it’s done: Just use another single quote For example, let’s take a look at a table called Books: Let’s say we want to insert another row for Continue Reading
How to see the definition of a View in SQL Server
Reading Time: 4 minutesMicrosoft SQL Server makes it very easy to create and use Views within SQL Server Management Studio. In this very brief tutorial, we’ll discuss how easy it is to see the definition of a View after it has been created and saved in your database. If you need a full Continue Reading
How to change a table name in SQL Server
Reading Time: 6 minutesChanging a table name in Microsoft SQL Server is a very easy task. Microsoft has a great built-in stored procedure we can use to easily change a table name. The stored procedure is called SP_RENAME. In this very brief tutorial, we’ll discuss how to use the SP_RENAME stored procedure and Continue Reading
What’s the difference between CHAR and VARCHAR? Answered!
Reading Time: 4 minutesWhen working with character string data types in Microsoft SQL Server, you might see CHAR and VARCHAR and wonder, “What’s the difference between the two“? In this very brief tutorial, we’ll discuss the difference between CHAR and VARCHAR. I actually have a full tutorial on all the character string data types Continue Reading
SQL CHAR Data Type: Explained
Reading Time: 5 minutesThe SQL CHAR data type is definitely a common data type you should know when querying and developing SQL Server databases. In this very brief tutorial, I’ll teach you everything you need to know about the SQL CHAR data type, and why it is a great choice for storing character Continue Reading