Overriding the maximum value of a bigint datatype in SQL Server

constraints, sql-server, sql-server-2008, t-sql

Solution

Yes, you could put a check constraint on the column

example

ALTER TABLE SomeTable
ADD CONSTRAINT chkMaxValue CHECK (SomeCol < 123456 );
GO

You could also use a trigger to restrict it but that is overkill

Problem

Could a database administrator override the largest value that a `bigint` datatype could hold (making it smaller than what is listed in the documentation)?

Original source