In this article, we will explore User-defined SQL Server Types and their usage.

An Overview of System Data Types

SQL Server supports various data types for storing different kinds of data. These data types store characters, numeric, decimal, string, binary, CLR and Spatial data types. Once you connect to a database in SSMS, you can view these data types by navigating to Programmability-> Types->System Data Types.

System Data Types

Here the data types are in different groups.

  • Exact Numeric: bit, Tinyint, Smallint, Int, Bigint, Numeric, Decimal, SmallMoney, Money.
  • Approximate Numeric: float, real
  • Data and Time: DateTime, Smalldatatime, date, time, Datetimeoffset, Datetime2
  • Character Strings: char, varchar, text
  • Unicode Character strings: Nchar, Nvarchar, Ntext
  • Binary strings: binary, Varbinary, image
  • Other Data types: sql_variant, timestamp, Uniqueidentifier, XML
  • CLR data types: hierarchyid
  • Spatial data types: geometry, geography

You can explore my earlier article An Overview of SQL Server Datatypes for understanding these data types and their ranges.

#sql commands #t-sql #sql #sql server

An Overview of User-defined SQL Server Types
1.10 GEEK