SP_Help Prec = 10

I ran SP_Help and the Prec  column for my ID field equaled 10

What does this mean?
Mr_ShawAsked:
Who is Participating?
 
tigin44Commented:
in your case you are running sp_help with an argument probably a table name.
in this case the prec column indicates the precision of the columns of alphanumeric types.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
what is the data type?
0
 
Mr_ShawAuthor Commented:
int
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Mr_ShawAuthor Commented:
Here is my output

Column_name: ID
Type:      int
Computed:      no
Length:      4
Prec:      10
Scale:      0
Nullable:      no
TrimTrailingBlanks:      (n/a)
FixedLenNullInSource:      (n/a)
Collation:      Null
0
 
tigin44Commented:
If sp_help is executed with no arguments, summary information of objects of all types that exist in the current database is returned.

so you have 10 objects in the db you are running this query.
0
 
Mr_ShawAuthor Commented:
Sorry the exlpanation you gave were a little to techi more me.

I ran sp_help[Table_Name] to return some more information about my table.

ID is just one field from my table.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
your ID is int data type, there the precision and scale are "read only", aka for information.
means that in short, you can have up to 10 digits in the number
0
 
tigin44Commented:
prec indicates the total number of digits..  In your case the data type is int and you can store a 10 digit number in that column...
if the column type to be float then the prec value would be 53 meaning that you can store 53 digit number including the point and the decimal place..
0
 
sureshchsahuCommented:
In short for your problem
Precision is before decimal and scale is after deicmal

In below case Precision is 10 digits and scale is two digits
1234567890.24
0
 
Mr_ShawAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.