Reading Time: 2 minutesThis might be the worlds shortest blog post. If you’re looking to understand the SQL DECIMAL vs NUMERIC data types, understand this: The SQL Server DECIMAL and NUMERIC data types are synonyms and can be used interchangeably. I pulled that information directly from the Microsoft documentation: decimal and numeric (Transact-SQL). Continue Reading
Josh D
SQL Server DECIMAL: Everything you need to know
Reading Time: 7 minutesThe SQL Server DECIMAL data type is a very common data type you will see and use in your career as a database professional. It’s important for you to know how it works and the rules for setting it up. DECIMAL is, of course, ideal for when you need to Continue Reading
SQL Server ROLLBACK: Everything you need to know
Reading Time: 9 minutesIn SQL Server, there are plenty of instances where you might want to undo a statement that was just ran. Maybe you wrote an UPDATE statement that modified too many rows, or maybe an INSERT statement wasn’t quite right. In these instances, it is great when the work is performed within a Continue Reading
Stored procedure with parameters: A guide for beginners
Reading Time: 11 minutesIf you need to write a stored procedure within SQL Server, odds are it will be a stored procedure with parameters. It is much more common to see a stored procedure with parameters than one without parameters. It’s important you understand both input and output parameters, which we will discuss in this tutorial. I Continue Reading
SQL Server Unique Index: Everything you need to know
Reading Time: 8 minutesIf you know a thing or two about Clustered indexes and Nonclustered indexes, you might be looking to “round out” the topic with an understanding of what a Unique index is. Unique indexes are a great way to enforce uniqueness in a column other than the Primary Key column. If Continue Reading
DATENAME function: Explained
Reading Time: 7 minutesThe DATENAME function is a system function in Microsoft SQL Server we can use to present meaningful date information to the user. We use this function to basically spell out a specific part of a date value. For example, if we have a date of 4/1/2021, we can use DATENAMEÂ to Continue Reading
DATETIME2 Data Type: Explained
Reading Time: 7 minutesThe DATETIME2 data type is one of several data types used to keep track of date and time information, obviously. Just like any other data type, there is a time and place where DATETIME2 might be the preferred type to use over other date and time types, like it’s close Continue Reading
SQL Integer Data Types – Everything you need to know
Reading Time: 6 minutesKnowing the difference between all the integer data types available to us in Microsoft SQL Server is very important when it comes to the task of designing and developing SQL Server databases. Most people don’t realize that a data type is essentially a constraint, meaning the data type you choose Continue Reading
Are you making this ROLLBACK mistake in your stored procedures?
Reading Time: 9 minutesIf you read my post about the 6 rules you should know about SQL Server transactions, you should know there is one rule that can be a bit tricky. This rule centers around the idea of doing a ROLLBACK within a stored procedure. The rule is this: When you leave Continue Reading
Top 6 tools you should know for writing AWESOME Select statements
Reading Time: 13 minutesAs a database professional, you will be asked to come up with SELECT statements to pull needed information in a meaningful and accurate way. Sometimes you will need to review other SELECT statements written by other people, too. Maybe those queries have a problem which is causing it to pull Continue Reading