Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Largest INT value

Author  Topic 

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2005-08-11 : 14:40:00
I know that the largest INT value in SQL Server is 2,147,483,647. Rather than hard-code that number, I thought I had seen a system variable that equated to that number. But I can't seem to find it now. Anyone know what it is, or am I just confused and I have to define the variable myself?

---------------------------
EmeraldCityDomains.com

X002548
Not Just a Number

15586 Posts

Posted - 2005-08-11 : 16:10:16
Would've been nice if they put it in systypes.....

What do you need it for?

How about a ISBIGINT funtion.....



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2005-08-11 : 16:56:04
Nah, I'm using it to make sure something sorts to the bottom of a list. I've got some add-on rows that don't have real int IDs, so I'm creating one for them.

---------------------------
EmeraldCityDomains.com
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-08-11 : 17:09:36
Maybe this is is more fun, and looks professional.
SELECT CAST(0x7FFFFFFF AS INT) AS MININT, CAST(0x80000000 AS INT) AS MAXINT

I also miss system defined constants.
But I bet they are lurking undocumented somewhere.

rockmoose
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2005-08-12 : 09:33:21
Ah, anywone remeber HIGH VALUES nad LOW VALUEs on the mainframe...I guess the concept could be the same here as well....



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page
   

- Advertisement -