[SQL] Difference between " and '
Eric Forget
forgete at cafederic.com
Wed Dec 24 10:54:56 CST 2003
>> I found something in an SQL query:
>>
>> SELECT RecID FROM Table WHERE Country = 'FR-M'
>>
>> and
>>
>> SELECT RecID FROM Table WHERE Country = "FR-M"
>>
>> do not behave the same. The first one will accept countries equal to "FR"
>> but not the second. Is it a normal SQL behavior?
>
> No.
>
> By SQL standard ONLY single quotes should be used for string constants.
So, it is weird that I could make it work only with double quote, no? And
not for all!
> Does your Country field have flag Index by words?
The only flag it has is indexed. The length is 2, in case it may impact: the
length of the string to compare with is from 2 to 6...
Éric
___________________________________________________________________
Eric Forget Cafederic
ForgetE at cafederic.com <http://www.cafederic.com/>
Fingerprint <86D5 38F5 E1FD 5D9C 71C3 BAA3 797E 70A4 6210 C684>
More information about the Valentina
mailing list