VARCHAR and NVARCHAR Data Types in SQL Server

Relational databases represent an organization’s data in tables that use columns with different data types allowing them to store valid values. Developers and DBAs need to know and understand the appropriate data type for each column for better query performance.

This article will deal with the popular data types VARCHAR() and NVARCHAR(), their comparison, and performance reviews in SQL Server.

CodingSight - VARCHAR and NVARCHAR Data Types in SQL Server
Read More

The Best SQL VARCHAR Do’s and Don’ts for Faster Databases

This post has “strings attached: for a good reason. We are going to explore deep into SQL VARCHAR, the data type that deals with strings.

Also, this is “for your eyes only” because without strings, there will be no blog posts, web pages, game instructions, bookmarked recipes, and a lot more for our eyes to read and enjoy. We deal with a gazillion strings every day. So, as developers, you and I are responsible for making this sort of data efficient to store and access.

With this in mind, we will cover what matters best for storage and performance. Enter the do’s and don’ts for this data type.

CodingSight - The Best SQL VARCHAR Do's and Don'ts for Faster Databases
Read More

Storing Binary Data Types in SQL Server


Daily work rarely requires storing binary data directly to database columns. However, it is very useful in some cases.

Contrary to popular opinion, byte arrays can help with significantly more than just storing large binary objects (documents, multimedia, etc.). Also, they can be used to store hash values and sample data for faster searching/high-level analysis. Or, they might contain bytes that are in ON/OFF states in some electronic relay. As soon as we start to think about hardware data stored in databases, applications become more apparent.

CodingSight - Storing Binary Data Types in SQL Server
Read More

SQL Data Types: 5 Worst Choices You Need to Stop Today

Do your choices of SQL server data types and their sizes matter?

The answer lies in the result you got. Did your database balloon in a short time? Are your queries slow? Did you have the wrong results? How about runtime errors during inserts and updates?

It is not so much a daunting task if you know what you’re doing. Today, you will learn the 5 worst choices one can make with these data types. If they have become a habit of yours, this is the thing we should fix for your own sake and your users.

CodingSight - SQL Data Types: 5 Worst Choices You Need to Stop Today
Read More