silly question re DECIMAL

what is the EXACT  decimal value for '100', or 100 % ?
LVL 18
dbaSQLAsked:
Who is Participating?
 
Aneesh RetnakaranDatabase AdministratorCommented:
> (decimal(5,3)
it should be decimal(6,3 )
0
 
dbaSQLAuthor Commented:
more detail, they need to write a 'percentage' value to a table.  having all sorts of problems w/the datatype (decimal(5,3)

0
.50
1
10.25
50
75.9
100


just looking for the best way to define the attribute
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
decimal (5,3) can store upto 99.999 while decimal (6,3) can store upto 999.999
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
dbaSQLAuthor Commented:
and the correct way for them to give me 100 ?  (100 %)
0
 
dbaSQLAuthor Commented:
just 100, right?

declare @1 = decimal(6,3)
set @1= 100
select @1  = '100.000'

yes?
0
 
dbaSQLAuthor Commented:
yep.   thank you, aneesh
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.