Why Java is case sensitive unlike SQL?

Is it a good concept to have a case sensitive lang. or not.
Like we have SQL which is not case sensitive....so which is better concept and why.

Sheetal_Singh wrote:
But there sho be some logic behind this that sun devp made it case sensitive......
It become difficult for user to made code because we have to remember d case as well.
SQL cm afetr Java n it is not case sensitive,So microsoft must hav thought smthing that they made a case insensitive lang.Yes, you're absolutely right: when Microsoft set out to write SQL, they learned from Java's mistake and made it case-insensitive. Moving forward, Google is building on their experience to create an even more powerful language called "BASIC" that's not only case-insensitive, it has line numbers embedded right in the code!

Similar Messages

  • Username - case sensitivity and embeded period

    I have been asked to investigate the impact of syncing our oracle user names with our AD names .. which would mean putting a period (dot) in the username. (example - john.doe). First attempt to create one returned an error which lead to the following testing:
    SQL> conn system/****
    Connected.
    SQL> --
    SQL> -- create a user with a dot in the name
    SQL> --
    SQL> create user ed.stevens identified by tiger;
    create user ed.stevens identified by tiger
    ERROR at line 1:
    ORA-01936: cannot specify owner when creating users or rolesOk, the '.' is seen as a delimiter, so must be quoted, probably leading to case sensitivity.
    SQL> create user "ed.stevens" identified by tiger;
    User created.
    SQL> grant create session to ed.stevens;
    grant create session to ed.stevens
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> grant create session to "ed.stevens";
    Grant succeeded.
    SQL> select username
      2    from dba_users
      3    where upper(username) like 'ED%'
      4    order by 1;
    USERNAME
    ed.stevens
    1 row selected.Now let's do it with an upper case name
    SQL> --
    SQL> create user ED.STEVENS identified by lion;
    create user ED.STEVENS identified by lion
    ERROR at line 1:
    ORA-01936: cannot specify owner when creating users or roles
    SQL> create user "ED.STEVENS" identified by lion;
    User created.
    SQL> grant create session to ED.STEVENS;
    grant create session to ED.STEVENS
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> grant create session to "ED.STEVENS";
    Grant succeeded.
    SQL> select username
      2    from dba_users
      3    where upper(username) like 'ED%'
      4    order by 1;
    USERNAME
    ED.STEVENS
    ed.stevens
    2 rows selected.Everything to here makes sense. Now lets' try to connect as these two nefarious characters!
    SQL> --
    SQL> conn ed.stevens/tiger
    ERROR:
    ORA-01017: invalid username/password; logon denied
    Warning: You are no longer connected to ORACLE.
    SQL> select user from dual;
    SP2-0640: Not connected
    SQL> conn "ed.stevens"/tiger
    Connected.
    SQL> select user from dual;
    USER
    ed.stevens
    1 row selected.
    SQL> --
    SQL> conn ED.STEVENS/lion
    Connected.Whaat?? Why wasn't the '.' seen as a delimiter here? This is the question that this example was leading to.
    SQL> select user from dual;
    USER
    ED.STEVENS
    1 row selected.
    SQL> conn "ED.STEVENS"/lion
    Connected.
    SQL> select user from dual;
    USER
    ED.STEVENS
    1 row selected.
    SQL> --
    SQL> spool off
    SQL> conn system/****
    Connected.
    SQL> drop user "ed.stevens";
    User dropped.
    SQL> drop user "ED.STEVENS";
    User dropped.

    Centinul wrote:
    Ed --
    I saw different behavior in my environment:
    SQL> CREATE USER "cen.tinul" IDENTIFIED BY mynx;
    User created.
    SQL> CREATE USER "CEN.TINUL" IDENTIFIED BY mynx;
    User created.
    SQL> GRANT CREATE SESSION TO "cen.tinul";
    Grant succeeded.
    SQL> GRANT CREATE SESSION TO "CEN.TINUL";
    Grant succeeded.
    SQL> SELECT * FROM V$VERSION;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL> CONNECT cen.tinul/mynx
    Connected.
    SQL> SHOW USER
    USER is "CEN.TINUL"
    SQL> CONNECT CEN.TINUL/mynx
    Connected.
    SQL> SHOW USER
    USER is "CEN.TINUL"
    "This just gets curioser and curioser."
    This is the system I used for the test posted above - running on 32-bit OEL under vmware on my laptop
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE10.2.0.4.0Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    5 rows selected.So I ran the test against our prod datbase, running under 64-bit HP-UX Itanium
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for HPUX: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    5 rows selected.As for what about the two is not shown, the 32-bit Linux was built with the 10.2.0.1 base install, then the 10.2.0.4.0 patchset, then the Oct 2009 CPU - all before creating the database. The database was created from scripts using CREATE DATABASE, as generated originally by dbca (not the 'restore database' scripts from dbca when using one of their pre-defined templates.)
    The HP-UX system was built as a 10.2.0.1 database, upgraded to 10.2.0.4, and has all CPU's through Jan 2010.
    Both systems gave exactly the same results, which are obviously different from yours ....
    A mystery wrapped in an enigma ....

  • IWeb vs. iweb -- case sensitive?

    Hello, when I try to link to my site with the address http://web.mac.com/myname/iweb (with a small w), it wont work. If I use http://web.mac.com/myname/iWeb (with a capital W) it's fine. Why is it case sensitive? Am I doing something wrong?
    G4 imac   Mac OS X (10.4.4)  

    Certain OS's, including the one used to host .mac web pages at Apple, use case sensitive file systems. They have always been that way.

  • Not able to install adobe due to Mac OS Extended (Case-sensitive, Journaled)?

    My harddisk is Mac OS Extended (Case-sensitive, Journaled) and  this does not support adobe aplications. Is there a way of changing the format?

    No, not easily. 
    How and why is it case-sensitive?  Macs are case-ignorant by default, but a few 3rd-party apps require it.  Do you have another app that requires it?
    Assuming you already have data on your Mac that you want to keep, you'll need to start with at least two full backups on two separate external HDs, because you'll have to erase the internal, reinstall OSX, and put your data back (that may be rather tedious).
    What version of OSX is your Mac running?

  • SomeJavaClass class can store in somejavaclass.java file? case sensitive?

    I have project in which class names don't coincide with file names absolutely. Difference is in case sensitivity, like Test1 class stores in test1.java file. Is it possible? Maybe it is possible in some OS? How to build the project?

    Do yourself a favour and do the right thing. Get the filenames correct. Why look for trouble?

  • Case sensitive sql - table and field names

    I have a weird problem.
    I have a client which works with MS SQL SERVER 2000.
    database collation name is: Turkish_CI_AS
    at the beginning I have this sql statement:
    "select value from [OWNER].setting"
    but because this table exists in database as "SETTING", I get java.sql.SQLException -
    [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'setting'.
    while I change the sql statement to:
    "select VALUE from [OWNER].SETTING"
    it works ok.
    I uses also other databases, but it works ok with small letters.
    How can avoid this problem? should I change all the sql statements to
    upper case?
    I will appreciate any help.
    Thanks.

    I am not sure about case sensitivity of tables, but as a convention, I always use table names in UpperCase separated only by _.
    I don't remember this to be a problem with Oracle or Sybase.
    ***Annie***

  • Jdbc bug in executeUpdate(sql, int[]) when table name is case-sensitive;

    I have found a bug in oracle's jdbc (ojdbc6.jar), can someone tell me how to submit it so that it can be fixed?
    The BUG: using executeUpdate(insert_sql_stmt, int[]) to retrieve the generatedKey generated by before-insert trigger using a sequence results in error when the tablename is case-sensitive (but OK if table name in uppercase).
    Steps to reproduce:
    1a. create table "mixCase" (f1 integer, f2 varchar2(20));
    1b. create table upperCase (f1 integer, f2 varchar2(20));
    2a. create sequence mixCase_seq start with 1;
    2b. create sequence upperCase seq start with 1;
    3a. create or replace trigger mixCase_trigger before insert on "mixCase"
    bq. for each row \\ begin \\ select mixCase_seq.nextval into :new.f1 from dual; \\ end;
    3b. create or replace trigger upperCase_trigger before insert on upperCase
    bq. for each row \\ begin \\ select upperCase_seq.nextval into :new.f1 from dual; \\ end;
    4a. String url = "jdbc:oracle:thin:@//localhost:1521/orcl";
    bq. conn=DriverManager.getConnection(url,user,password); \\ Statement stmt = conn.createStatement (); \\ int rc=stmt.executeUpdate("insert into \"mixCase\"(f2) values('aa')",new int[]{1});
    4b. String url = "jdbc:oracle:thin:@//localhost:1521/orcl";
    bq. conn=DriverManager.getConnection(url,user,password); \\ Statement stmt = conn.createStatement (); \\ int rc=stmt.executeUpdate("insert into upperCase(f2) values('aa')",new int[]{1});
    When you run 4a or 4b in a java jdbc program:
    4b runs OK and rset=stmt.getGeneratedKeys() returns the correct f1 value of 1.
    4a results in error:
    bq. h6. java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist \\ + at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)+ \\ + at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)+ \\ + at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)+ \\ + at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)+ \\ + at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:406)+ \\ + ...+
    +Notes:</</em>
    # If Statement.RETURN_GENERATEDKEYS is used instead of "new int[]{1}" in 4b, there is no error but the rset=stmt.getGeneratedKeys() returned in a ROWID such as 'AAARUyAAEAAAAGQAAL', not what is expected. Other database's jdbc return the correct generated integer value.
    # Same 4b error if new String[]{"f1"} is used as 2nd argument for executeUpdate.
    # The only difference in 4a and 4b is that 4a has case-sensitive table name. All sequence names, trigger names, column names are implicitly deemed to be uppercase by oracle in both cases.
    bq.
    Edited by: user10343198 on Oct 2, 2008 5:50 PM
    Edited by: user10343198 on Oct 2, 2008 6:34 PM

    Please patch one fo your machines to 10.2.0.3 and then try and duplicate. You do not have to go through the complete registration of the XSD process thoguh you can check and see if the c based parser will validate on the command line using the
    schema executible under your oracle_home bin directory.
    schema 1.xml 1.xsd
    for example
    if it dupes in 10.2.0.3 open a TAR with support so that we may bug it.
    regards
    Coby

  • Is a Full Text Index search case sensitive or not in SQL Server 2012?

    I setup full text index on my contact table and am attempting to run a search on it using the following query:
    SELECT *
    FROM sysdba.Contact C
    WHERE CONTAINS(C.FirstName, 'Test')
    OR CONTAINS(C.LastName, 'Test')
    The problem is it's clearly running a case sensitive search. I did a quick search to find out how to change it to be case in-sensitive and found two pages (both for SQL Server 2012) with conflicting answers:
    1 - MSDN - "Query with Full-Text Search" - http://msdn.microsoft.com/en-us/library/ms142583(v=sql.110).aspx
    Case sensitivity
    Full-text search queries are case-insensitive. However, in Japanese, there are multiple phonetic orthographies in which the concept of orthographic normalization is akin to case insensitivity (for example, kana = insensitivity). This type of orthographic normalization
    is not supported.
    1 - TechNet - "Full-Text Search (SQL Server)" - http://technet.microsoft.com/en-us/library/ms142571(v=sql.110).aspx
    Full-text queries are
    not case-sensitive. For example, searching for "Aluminum" or "aluminum" returns the same results.
    Can someone please explain this? Is it possible to do it without it being case sensitive? If yes, how?
    (Sorry, I couldn't make those links b/c TechNet hasn't verified my account)
    Thank you for your time and help,
    Hanan

    Whats the collation setting for the columns? try using a case insensitive collation as below
    SELECT *
    FROM sysdba.Contact C
    WHERE CONTAINS(C.FirstName COLLATE SQL_Latin1_General_CP1_CI_AS, 'Test')
    OR CONTAINS(C.LastName COLLATE SQL_Latin1_General_CP1_CI_AS, 'Test')
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Case sensitive urls in sun java system applicatoin server 8.1 pe?

    I have installed the sun java system application server 8.1. Using netbeans 4.1 I have deployed a few web applications.
    The server is listening on port 8080 and it is serveing up my web pages fine....EXCEPT it looks like the url I type in the browser is case sensitive. Is that right? Is there a way I can specify that the url is not case sensitive?
    Please tell me that the sun developers did not make the appliation server case sensitive.

    I have installed the sun java system application server 8.1. Using netbeans 4.1 I have deployed a few web applications.
    The server is listening on port 8080 and it is serveing up my web pages fine....EXCEPT it looks like the url I type in the browser is case sensitive. Is that right? Is there a way I can specify that the url is not case sensitive?
    Please tell me that the sun developers did not make the appliation server case sensitive.

  • Case sensitive within character literals in SQL Server and Oracle

    I am migrating SQL Server database to Oracle database by using Oracle Workbench.
    SQL Server is not case sensitive, but Oracle PL/SQL is case sensitive within character literals. for example, if sort the following string ('UN','Win', 'iS' ,'Ne','zS'), SQL Server will get ('iS', 'Ne','UN','Win','zS') order, but Oracle PL/SQL will return ('Ne','UN','Win','iS','zS') order.
    Anyone has idea how I can get same result as SQL Server without change PL/SQL code (I don't want to change "ORDER BY typename" to "ORDER BY UPPER(typename)" for every stored procedure).
    Thanks

    Jimmy,
    alter session set NLS_SORT=West_European;
    is the closest thing I know of, but UPPER() is the only sure way.
    West_European sort order is AaBbCc ... 0123456789
    usually sort order is 0123456789 ABC ... abc ...

  • How to select a case sensitive value in SQL with C#

    Hello,
    I have an application that at the begining a user will login with a user name and password which is stored in the database. The SQL statement is as follows:
    "SELECT id_employee FROM employee WHERE employee_number='" + txtUserName.Text + "' AND passWord='" + txtPassword.Text + "'";
    For testing purposes I have set the password to the word test.   The problem is, if the user enters in TEST or TeSt or TESt  it will grant them access. How do I set it to force the correct case?
    I am using SQL 2005 for the database.
    Thanks!
    ~zero

    You can also set Collation while comparing strings:
    "SELECT id_employee FROM employee WHERE employee_number='" + txtUserName.Text + "' COLLATE Latin1_General_CS_AS AND passWord='" + txtPassword.Text + "'  COLLATE Latin1_General_CS_AS";
    All comments about not doing this type of quering using command string, instead of command with parameters, they are apsolutely right.
    Nevertheless i will have only username as a parameter in the command and password will be return value from procedure. I will check for equality of entered password and returned one from command in C# code, and C# is case sensitive. There is a good security model implemented for password in AdventureWorks sample database for SQL Server 2005, in table Person.Contact.
    That model use two fields for password, PasswordHash and PasswordSalt. PasswordSalt is randomly generated hash when password is modified and with that salt, password string is encrypted, which produce PasswordHash. So when you want to authenticate a user, execute a command that will return a row(PasswordHash and PasswordSalt) for entered username, and in application you will encrypt entered username with PasswordSalt. If generated string is equal with the one returned PasswordHash, then you have a valid login. If nothing is returned from command or they are not equal, you have invalid login.

  • Case sensitive issue CF7 & SQL 2005

    I had to rebuild a database from a backup recently. Now I am having a case sensitive issue in my queries that I did not have before.
    The following use to work with Rockmart in lowercase even though Rockmart was in the table as all uppercase like so ROCKMART.
    <cfquery name="updateAreas" datasource="mySource">
       UPDATE Property
       SET AR = 3610
       WHERE  City = 'Rockmart'
    </cfquery>
    The above has stopped working now the query must specify ROCKMART because it is in the table in all upper case.
    My database option is set to SQL_Latin1_General_CP1_CI_AS
    Any ideas.
    Many thanks for you help.
    Brian

    A collation can be specified at the server, database, and column level in SQL server.  The column collation will take precedence over the database collation.  Check that the collation for the column is case-insensitive.  You can use the query below to get the column's collation.
    SELECT COLUMN_NAME, COLLATION_NAME
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'Property'
        AND COLUMN_NAME = 'City'
    You can get info on the collations supported by SQL Server at:
    http://msdn.microsoft.com/en-us/library/ms144250%28SQL.90%29.aspx
    You can change a column's collation if you need to, but you should be sure that this will not affect any other applications which query the same data.  Another option is to specify the desired collation in your query as suggested by glynjackson.
    http://msdn.microsoft.com/en-us/library/ms190920%28SQL.90%29.aspx

  • How can change Case Sensitivity in MS SQL 2008

    hi expert,
    I want to change Case Sensitivity to Case Insensitivity  in MS SQL 2008.
    how can I do??
    any help please
    thanks and regards
    jun

    Hello,
    there is no way to change this. The SQL Server itself and the SAP Database are installed in an case sensitive collation. If you were albe to change this, your installation will be no longer supported and will, in the worst case, generate incorrect data within the SAP database.
    So, start live with it, there is no way to change it.
    Best regards
    Clas

  • SQL case sensitivity

    i know its a bit off topic for the java forums (in my defence it is to do with a JSP i'm writting), but i thought that someone here probably has come across this at some point.
    basically, i need to retrieve lines from my database using something similar to:
    SELECT * FROM tableX WHERE fieldY LIKE '%searchTerm%';
    but i've noticed that this is case sensitive. how can i make it so its not? do i have to change the search term and run multiple queries for different capitalised forms of the search term?

    I believe it depends on your db engine. Some provide a way to make all queries case-insensitive on a table/column or just provide a way to make things lower/upper case for the comparison.

  • Why Case-Sensitive while assigning tasks to other users??

    I am trying to assign a task to another user through AdminUI.
    While searching for users, I am supposed to provide case-sensitive search text to find actual users.
    In previous installations it is not a problem. i.e only in production it happens.
    Is there any place to modify this settings?
    Please see the attached screenshot of the page.
    Thanks,
    Nith

    Raghu,
    thanks for the reply, you are right as per the audit .But suppose if it is for 200 users ,creating 200 CUP requests will be impractical right.
    there should be some solution for this , because there will be many situations practically where we have to assign roles to N number of users.
    Is this possible in GRC 10 ? any idea ?
    Regards,
    Jaags

Maybe you are looking for

  • Calendar selection not the same as in iCal ?

    In Calendar I want show/hide my calendars like in iCal but I can only select either one of them or ALL. This is not nice especially with Weeknumber, showing an event every day if I select ALL. I want to optionally enable the Weeknumbers view. Can thi

  • How to Upgrade a Processor?

    Hi everyone, I have an old 733 MHz Quicksilver G4 single processor with 1.25 GB. It's a base model but I added a LaCie Super Drive into it some years ago. I am thinking about upgrading the single processor to a dual processor. Is this possible? What

  • PDF security

    Hi everyone, I create artwork for a print shop and provide the owner with a pdf file which she then emails to her customers to get their approval for printing. She tells me that she's worried that if she sends high-res pdf files to her clients that t

  • This program is showing errorss

    hi, Can any one tell why this program is showing errorss class A {     /** Creates a new instance of a */   int i=10;   int j;   try        i= 20/0;   catch (ArithmeticException a)       System.out.println(a); class exp1      public static void main(

  • File not playing

    I moved an imovie file from my hard drive to an external drive. I might have messed up, becuase I did not export the file. I just moved the file from the imovie project folder to my external. Now when I want to go back and work on it, I open the file