Reading Time: 2 minutes SQL 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 minutes Microsoft 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 minutes Changing 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
SQL Server NVARCHAR Data Type: Explained
Reading Time: 6 minutes The NVARCHAR data type is used to store character string data within our Microsoft SQL Server databases. It’s important that you know how NVARCHAR works so that your database doesn’t waste space. In this very brief tutorial, we’ll discuss how NVARCHAR works and when you should consider using it. NVARCHAR Continue Reading
What’s the difference between CHAR and VARCHAR? Answered!
Reading Time: 4 minutes When 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 minutes The 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
SQL VARCHAR Data Type: The Ultimate Guide for Beginners
Reading Time: 5 minutes It’s very important to know a thing or two about data types in Microsoft SQL Server. We need to understand the differences between various data types so our tables don’t waste space, and so that our queries perform as efficiently as possible. One such data type we should understand is Continue Reading
What is a Candidate Key in SQL Server? Answered!
Reading Time: 7 minutes There are many different keys in SQL Server that are important to understand. You might have heard the term “Candidate Key” before, but maybe you aren’t exactly sure what that means. Maybe you know a thing or two about Primary Keys and Foreign Keys, but you’re not sure what the term “Candidate Continue Reading
What’s the difference between ROWS and RANGE? Explained!
Reading Time: 5 minutes Window functions are a great thing to know when querying data in a Microsoft SQL Server database. If you need an introduction to SQL Server window functions, you should definitely check out my full tutorial on the topic: SQL Server Window Functions: An introduction for beginners Also, all the information Continue Reading
SQL LAG and LEAD Window Functions: Explained
Reading Time: 9 minutes The SQL Server LAG and LEAD functions are simple window functions you should know to help you gather meaningful information from your data. Window functions are considered an advanced tool when querying data in SQL Server. If you’re trying to learn about window functions, congratulations, you’re moving up! The LAG and Continue Reading