SQL Server – Data Types

The term "data type" in SQL Server refers to the several kinds of data that can be entered into a table's columns, including date and time, integer, string, and binary strings.

1. Data Types for SQL Server

What is the difference between varchar and nvarchar types?
Ans: Varchar and nvarchar are same but the only difference is that nvarhcar can be used to store Unicode characters for multiple languages and it also takes more space when compared with varchar.


What are the possible values of a BOOLEAN data field?
Ans: In PostgreSQL, the BOOLEAN data type exists explicitly and takes values TRUE, FALSE, or NULL. In Microsoft SQL Server, the BIT datatype is used to store Boolean values as integers 1 (true) or 0 (false).