Hi,
the nvarchar field "myfield" contains the stringvalue 'myvalue' (in lower
case).
I did this sql statement:
select myfield from mytable where myfield='MYVALUE'
and .. i got the record.
May i conclude that SQL does make no difference between 'MYVALUE' and
'myvalue'?
Thanks
BobOn Sep 7, 1:41 pm, "Bob" <n...@.spam.ur> wrote:
> Hi,
> the nvarchar field "myfield" contains the stringvalue 'myvalue' (in lower
> case).
> I did this sql statement:
> select myfield from mytable where myfield='MYVALUE'
> and .. i got the record.
> May i conclude that SQL does make no difference between 'MYVALUE' and
> 'myvalue'?
> Thanks
> Bob
The answer is yes. SQL server is not case sensitive.|||Thanks
"SB" <othellomy@.yahoo.com> schreef in bericht
news:1189151637.431898.75760@.o80g2000hse.googlegroups.com...
> On Sep 7, 1:41 pm, "Bob" <n...@.spam.ur> wrote:
>> Hi,
>> the nvarchar field "myfield" contains the stringvalue 'myvalue' (in lower
>> case).
>> I did this sql statement:
>> select myfield from mytable where myfield='MYVALUE'
>> and .. i got the record.
>> May i conclude that SQL does make no difference between 'MYVALUE' and
>> 'myvalue'?
>> Thanks
>> Bob
> The answer is yes. SQL server is not case sensitive.
>|||This answer isn't necessarily true. The column collation is used which
determines case sensitivity. It can be overridden at the TSQL statement level
using COLLATE, but if this is not there, you have to refer to the column's
collation.
HTH,
Paul Ibison|||Hello Bob,
I just want to prevent a possible misunderstanding.
SQL Server is not always "case insensetive". This is about the collation
settings that you set when you setup SQL Server.
If you selected "Case Sensetive" when you set it up, then your current query
would return nothing.
Please read below document from BOL for more information about this setting:
http://msdn2.microsoft.com/en-us/library/ms143508.aspx
--
Ekrem Önsoy
"Bob" <no@.spam.ur> wrote in message
news:OpBGlTS8HHA.484@.TK2MSFTNGP06.phx.gbl...
> Thanks
> "SB" <othellomy@.yahoo.com> schreef in bericht
> news:1189151637.431898.75760@.o80g2000hse.googlegroups.com...
>> On Sep 7, 1:41 pm, "Bob" <n...@.spam.ur> wrote:
>> Hi,
>> the nvarchar field "myfield" contains the stringvalue 'myvalue' (in
>> lower
>> case).
>> I did this sql statement:
>> select myfield from mytable where myfield='MYVALUE'
>> and .. i got the record.
>> May i conclude that SQL does make no difference between 'MYVALUE' and
>> 'myvalue'?
>> Thanks
>> Bob
>> The answer is yes. SQL server is not case sensitive.
>|||Respectfully, this is also only partially true. The collation setting chosen
during the installation becomes the default for the new databases, but it may
be overridden during database creation (or afterwards). Likewise, the
database collation becomes the default for new text-based columns, but this
may also be overridden. The column-level collation is the one being used in
the query, provided that the keyword COLLATE isn't used.
Cheers,
Paul Ibison|||Thanks for addition ;)
--
Ekrem Ã?nsoy
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:A8FE3DCB-F05A-4A4A-B76C-D8CBE3C0C957@.microsoft.com...
> Respectfully, this is also only partially true. The collation setting
> chosen
> during the installation becomes the default for the new databases, but it
> may
> be overridden during database creation (or afterwards). Likewise, the
> database collation becomes the default for new text-based columns, but
> this
> may also be overridden. The column-level collation is the one being used
> in
> the query, provided that the keyword COLLATE isn't used.
> Cheers,
> Paul Ibison
>sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment