SQL Server data types
SQL Server groups its column types into numbers, date and time, character and binary strings, and special types.
Supported in the tables below means TableAI shows the value in the grid and lets you edit it where the column allows editing. rowversion is read-only, because SQL Server generates its value.
Use Cell Value or Row Detail to inspect the selected cell.
What are the SQL Server number types?
Section titled “What are the SQL Server number types?”| Type | What it stores | TableAI |
|---|---|---|
tinyint |
Integer from 0 to 255 | Supported |
smallint |
Integer from -32,768 to 32,767 | Supported |
int |
Integer from -2,147,483,648 to 2,147,483,647 | Supported |
bigint |
Integer from -2^63 to 2^63-1 | Supported |
decimal, numeric |
Exact fixed-point number with a set precision and scale | Supported |
money, smallmoney |
Currency amounts with four decimal places | Supported |
float, real |
Approximate floating-point numbers | Supported |
bit |
1, 0 or NULL |
Supported |
What are the SQL Server date and time types?
Section titled “What are the SQL Server date and time types?”| Type | What it stores | TableAI |
|---|---|---|
date |
A calendar date | Supported |
time |
A time of day, with fractional seconds | Supported |
datetime |
A date and time from 1753-01-01, accurate to about 3 milliseconds | Supported |
smalldatetime |
A date and time from 1900-01-01 to 2079-06-06, accurate to a minute | Supported |
datetime2 |
A date and time with fractional seconds of up to seven digits | Supported |
datetimeoffset |
A datetime2 value with a time zone offset |
Supported |
What are the SQL Server string types?
Section titled “What are the SQL Server string types?”| Type | What it stores | TableAI |
|---|---|---|
char(n), varchar(n) |
Fixed-length and variable-length non-Unicode text | Supported |
varchar(max) |
Non-Unicode text up to 2 GB | Supported |
text |
Deprecated large non-Unicode text; use varchar(max) |
Supported |
nchar(n), nvarchar(n) |
Fixed-length and variable-length Unicode text | Supported |
nvarchar(max) |
Unicode text up to 2 GB | Supported |
ntext |
Deprecated large Unicode text; use nvarchar(max) |
Supported |
sysname |
A system-defined alias for nvarchar(128) |
Supported |
binary(n), varbinary(n) |
Fixed-length and variable-length bytes | Supported |
varbinary(max) |
Bytes up to 2 GB | Supported |
image |
Deprecated large binary data; use varbinary(max) |
Supported |
What are the other SQL Server types?
Section titled “What are the other SQL Server types?”| Type | What it stores | TableAI |
|---|---|---|
uniqueidentifier |
A 16-byte GUID | Supported |
rowversion, timestamp |
An 8-byte counter that SQL Server changes on every row update | Supported |
xml |
An XML document or fragment | Supported |
json |
A JSON document (SQL Server 2025) | Supported |
vector |
A vector of floating-point values (SQL Server 2025) | Supported |
sql_variant |
A value of another base type | Supported |
geometry |
Planar spatial data | Supported |
geography |
Round-earth spatial data | Supported |
hierarchyid |
A position in a hierarchy | Supported |
| CLR user-defined types | A type defined in a .NET assembly | Supported as hex |
How does TableAI show each SQL Server value?
Section titled “How does TableAI show each SQL Server value?”| Type | What to expect |
|---|---|
tinyint, smallint, int, bigint |
Integer values, including large bigint values, retain their digits. |
decimal, numeric |
Decimal text retains its precision and scale. |
money, smallmoney |
Values retain the database’s numeric text. |
float, real |
Approximate numbers use the text returned by SQL Server. |
bit |
SQL values are 1, 0 or NULL. |
char, varchar, nchar, nvarchar |
Text includes Unicode values and long MAX values. |
uniqueidentifier |
UUID text. |
xml |
XML text; SQL Server validates changes when you apply them. |
json |
JSON text. SQL Server stores an object or array and rejects other text when you apply the edit. |
vector |
A list such as [0.1, 2, 30], with each number written in its shortest exact form. |
sql_variant |
The stored value, shown the way its base type is shown. |
geometry, geography |
Well-known text such as POINT (10 5). |
hierarchyid |
A path such as /1/2/. |
| CLR user-defined types | The serialized value as 0x-prefixed hexadecimal text. |
For text and numeric cells, copying uses the value’s full text. The results guide covers selection, copying and cell inspection.
Dates, times and offsets
Section titled “Dates, times and offsets”TableAI retains SQL Server date and time text, including fractional seconds and datetimeoffset offsets. Enter an ISO 8601 value that matches the column type:
| Type | Example input |
|---|---|
date |
2026-04-15 |
time |
14:30:12.1234567 |
datetime2 |
2026-04-15T14:30:12.1234567 |
datetimeoffset |
2026-04-15T14:30:12.1234567+02:00 |
The column’s declared precision determines what SQL Server stores. Keep an explicit offset when editing datetimeoffset.
Spatial, hierarchy and variant values
Section titled “Spatial, hierarchy and variant values”geometry and geography cells show well-known text. When the SRID isn’t the type’s default (0 for geometry, 4326 for geography), the text starts with it, for example SRID=3857;POINT (10 5). Enter text in the same form; without a prefix, TableAI uses the default SRID. geography text lists longitude before latitude.
Enter hierarchyid values as paths such as /1/2/ or /1/2.5/. Every CLR type also accepts 0x hexadecimal bytes, which is how you edit a custom CLR type.
An edited sql_variant value keeps its base type, precision and scale. A new value, or one that was NULL, is stored as nvarchar.
When you change other columns in a row, TableAI writes unchanged spatial, hierarchyid and CLR values back from their original bytes, so their precision doesn’t change.
In a table without a primary key, a row that holds a vector value can’t be matched exactly, so TableAI doesn’t edit it.
Binary values and rowversion
Section titled “Binary values and rowversion”Binary cells show a size summary. Use Save as… from the cell menu to save their bytes; see binary cell actions.
rowversion, also named timestamp in SQL Server, is a server-generated binary counter. It appears and copies as 0x-prefixed hexadecimal text. It is not a date or time, and SQL Server generates its next value when a row changes.
Enter values for an edit
Section titled “Enter values for an edit”Enter text without surrounding SQL quotes. TableAI prepares Unicode string literals and typed date literals for the SQL preview.
Use the explicit Set to NULL and Set to DEFAULT actions for those SQL values. Empty text, the word NULL and SQL NULL have separate meanings. The safe editing workflow covers these choices and the review before Apply.
Identity and computed columns receive their values from SQL Server. When a cell cannot be edited, check the explanation through read-only results. For a rejected value, read the database cause in edit rejected.
Export values
Section titled “Export values”Use the import and export workflow to choose file formats and NULL or binary representations. SQL data exports omit generated columns and include IDENTITY_INSERT statements when exporting identity values.
Related
Section titled “Related”Return to the SQL Server overview or write T-SQL for conversions and expressions in a query.