Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Case sensitivity is fundamental to computing, for the simple reason that the ASCII value of 'yun' != the ASCII value of 'YUN'. So, when you say ... </p> <blockquote> <p>consider data as case insensitive</p> </blockquote> <p>... do you mean just for the purposes of search or for storage as well?</p> <p>The problem with enforcing case on every search is this:</p> <pre><code>SQL&gt; create table t23 (id number, name varchar2(20)) 2 / Table created. SQL&gt; create unique index t23_uk on t23(name) 2 / Index created. SQL&gt; insert into t23 values (1, 'SAM-I-AM') 2 / 1 row created. SQL&gt; insert into t23 values (2, 'sam-i-am') 2 / 1 row created. SQL&gt; select id, name, ascii(name) from t23 2 / ID NAME ASCII(NAME) ---------- -------------------- ----------- 1 SAM-I-AM 83 2 sam-i-am 115 SQL&gt; </code></pre> <p>If case insensitive searches are enforced at the schema or table level how can we ever distinguish 'sam-I-am' from 'SAM-I-AM'? </p> <p>It is - sort of - possible to enforce case-insensitivity for data storage, albeit at the individual column level:</p> <pre><code>SQL&gt; delete from t23 2 / 2 rows deleted. SQL&gt; drop index t23_uk 2 / Index dropped. SQL&gt; create unique index t23_uk on t23(upper(name)) 2 / Index created. SQL&gt; insert into t23 values (1, 'SAM-I-AM') 2 / 1 row created. SQL&gt; insert into t23 values (2, 'sam-i-am') 2 / insert into t23 values (2, 'sam-i-am') * ERROR at line 1: ORA-00001: unique constraint (APC.T23_UK) violated SQL&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload