|
-
Sep 27th, 2007, 02:39 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] Zero value cannot store in database
I have field name "Category" and its is number data type. Why I cannot store zero value in the table, I want to store the value like this 0001 but it store the value in the "category" field as '1' .Why?
-
Sep 27th, 2007, 05:47 AM
#2
Re: Zero value cannot store in database
0001 is a text field - we would store that as VARCHAR(4).
Leading 0's are not supported in a numeric type of field - those fields store numbers and leading 0's, being not significant, are simply discarded.
-
Sep 27th, 2007, 06:05 AM
#3
Re: Zero value cannot store in database
In other words, if you want the leading zero's change the field type from number to text, otherwise, those zeros will continue to be dropped.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|