mysql VARCHAR acting like INT


Posted on 16th Feb 2014 07:03 pm by admin

Hi, All.

I have a table that contains a varchar(10) column named weird_field. In this column, only integers reside (e.g., 3010101009). When I do this:

Did you know?Explore Trending and Topic pages for more stories like this.
Line number On/Off | Expand/Contract select * from table where weird_field = '3010101009'

no records are returned, even though there is a record with weird_field = '3010101009'.

However, if I do this:

Line number On/Off | Expand/Contract select * from table where weird_field = 3010101009

the appropriate records are returned. I don't think this should be the case, right? Because it's a varchar column, shouldn't the 3010101009 be quoted? It's messing up some joins I'm trying to do, and I just don't get it.

Thanks
No comments posted yet

Your Answer:

Login to answer
284 Like 49 Dislike
Previous forums Next forums
Other forums

Simultaneous select/update/insert
Hi

How would I need to go about when 2 users update a single row simultaneous? And how would

do while conditions
i want to display 6 images in a 2x3 table
now what would be the correct logic to
count that th

Sum of Values in an Array
This is probably really simple... but it's been years since I've written anything, so bare with me!<

SCO Unix
I know this might not be the place to ask, but, can anyone tell me if SCO Unix comes with PHP built

writing a screen scraper
Hello,

I'm writing a screen scraper application and want to be able to get absolute addresses

form help
this doesn't work. i want the form action to go the location.href of the submit button chosen.. how

multipart emiail forms
Hi All,

I am new to the boards and I've been working on a form (which is rather massive, imo

Need to write a cookie with a url var
Not sure if its possible, but I need to write a cookie with a url.

So this would write 2232 a

i want run some web server under the ip sharer
hello i want run some web server under the ip sharer
my ip is floating ip but it doesnt matter

Intrastat Report Config in ECC 6.0 - goods Movement in EU countries
Colleagues, need ur help to understand the changes require in ECC 6 standard Report configuration se

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash