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

What is a Candidate Key in SQL Server? Answered!

Reading Time: 7 minutesThere 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

SQL LAG and LEAD Window Functions: Explained

Reading Time: 9 minutesThe 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

FIRST_VALUE and LAST_VALUE: SQL window functions you should know

Reading Time: 9 minutesThe SQL Server FIRST_VALUE and LAST_VALUE 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 FIRST_VALUE Continue Reading