3

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

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Elliott
  • 5,523
  • 10
  • 48
  • 87

2 Answers2

7

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

SQLMenace
  • 132,095
  • 25
  • 206
  • 225
4

no, but you can create a check yourself so values wont exceed a certain value, like this:

create table test_bigint(
my_value bigint check (my_value <100)
)
Diego
  • 34,802
  • 21
  • 91
  • 134