T-SQL Script for Integer values

  • I'm looking for a script that identifies max values used in a table for all smallints, ints and bigints to determine if they are being used correctly.

    I know I've used a script that does this in the past, which was on a blog post but I can't find it anywhere ( and I'm far to lazy to write one from scratch!).

    Can anyone help??

  • d.carpenter (12/29/2014)


    I'm looking for a script that identifies max values used in a table for all smallints, ints and bigints to determine if they are being used correctly.

    I know I've used a script that does this in the past, which was on a blog post but I can't find it anywhere ( and I'm far to lazy to write one from scratch!).

    Can anyone help??

    Quick suggestion, give it a go and shout for help if you get stranded

    😎

  • Found the blog post I was after.

    http://thomaslarock.com/2012/09/does-this-datatype-make-my-column-look-fat/

  • d.carpenter (12/29/2014)


    Found the blog post I was after.

    http://thomaslarock.com/2012/09/does-this-datatype-make-my-column-look-fat/

    Quick question, which edition of SQL Server are you using? Reason for asking is that if you are using the Enterprise edition, you can bypass this problem by using either row or preferably page compression.

    😎

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply