Could a database administrator override the largest value that a bigint
datatype could hold (making it smaller than what is listed in the documentation)?
Asked
Active
Viewed 422 times
3
2 Answers
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