Hi,

if i take varchar means on searching its not getting all values

Yes, that is correct it won't bring back all the values.

This is because the numbers 3.1 and 3.10 are exactly same number

but the strings 3.1 and 3.10 are very different.

As I said in my previous post, I really don't understand the question.

Why does it matter that if you enter 3.10 and 3.1 is saved. They are both the same number. You may have a valid reason, I don't know.

If you convert the varchar as ck suggests then the zero will be dropped again.

If you keep the varchar idea then 3.1 and 3.10 won't match in a search.

So at this point you are faced with a decision.

All number types will drop zeros from the end of the decimal part. There is nothing you can do about that.

So either

1) you use decimal type, perhaps decimal(18,4) which means 4 decimal places.

With that

an entry of 3.1 will appear in queries as 3.1000

an entry of 4.190 will appear in queries as 4.1900

or

2) You use some other number type such as float or real

which means an entry of 3.10 will appear in queries as 3.1

and an entry of 4.190 will appear in queries as 4.19

or

3) you use a varchar and come up with some tricky way to keep the number as string but still be able to search correctly.

Perhaps you can select the field in your queries twice. Once for displaying the number as entered and the second one you convert it back to a number for your query searching.