About Case Sensitivity
Article by Rampant author Laurent Schneider
SQL is a case insensitive language. That
means, you can write any SQL statement in uppercase or
SQL> SELECT DUMMY FROM DUAL;D
select dummy from dual;
Some formatters like Toad and some
courseware like Skillsoft E-Learning advise to use UPPERCASE for
commands and lowercase for tables and columns.
Formatted on 2008/09/19 10:00
(Formatter Plus v4.8.8) */
Well, Toad decided to put DUAL in
uppercase. Anyway, this is no authority, define your own
guideline and stick to it. If you use TOAD a lot, it is maybe OK
to use lowercase for non-keywords.
The column dummy is actually the uppercase
“DUMMY” column of “DUAL”. Putting double quotes around a column
of table makes it case sensitive, so “DUMMY” is not “dummy”.
SQL> select "dummy" from "dual";
select "dummy" from "dual"
ORA-00942: table or view does not exist
SELECT "DUMMY" FROM "DUAL";OK, something very bad about Toad formatter is (at least
the version I am using) that it considers unquoted password to
be case insensitive. Which is wrong. The password, in 11g, is
case sensitive, even when not in double quotes. Therefore, be
sure to put the right case when creating scripts and do not
format your CREATE USER statements with Toad or use double
quotes for disambiguation!
ALTER USER scott IDENTIFIED BY BIG;
SQL> /* Formatted on
2008/09/19 10:17 (Formatter Plus v4.8.8) */
SQL> ALTER USER
scott IDENTIFIED BY big;
SQL> connect scott/BIG
ORA-01017: invalid username/password; logon denied
You are no longer connected to ORACLE.