1,642 questions

3,186 answers

1,714 comments

478 users

Table Spec Required attribute not working the way I expected

0 votes

Hello all,
I recently created a table spec with several columns where a null value is OK.
My assumption was, with a table spec when you set a columns required attribute it should create the table accordingly. So, can anyone tell me how I setup the table spec to allow NULL values for Int, TinyInt, SmallInt columns?

thanks
Will

asked Jan 11 by willomalley (197 points)   2 9 24
edited Jan 11 by willomalley

1 Answer

0 votes

Unfortunately this is not supported through the SDK. I've always just used -1 as the default value and then nullif(COLUMNNAME, -1) in my code, not ideal but it works.

You can always write an alter script and have that ran as part of the deployment if the above mentioned hack isn't up to your liking.

answered 5 days ago by chriswhisenhunt (3,865 points)   8 26 43
...