SQL identifiers are not case sensitive. I'm not sure what the JDBC
spec says regarding how metadata should be returned, but most JDBC 
drivers I've seen return uppercase for table and column names, and
leave it to the user to normalize.

Since sqlite_master is unique to SQLite, and out of scope of any spec,
you could do this:

select * from sqlite_master where name = 'V_TEST' collate nocase;

Side note: sqlite_master.name is the name of the table/view/index/trigger,
whereas sqlite_master.tbl_name is the name of the table/view that 
indexes and triggers act on. In the case of a table or view definition
sqlite_master.name is the same as sqlite_master.tbl_name.

--- Thomas Kellerer <[EMAIL PROTECTED]> wrote:
> I noticed a small discrepancy between the information returned by the
> JDBC driver and the names stored in the table sqlite_master.
> 
> The driver seems to always return the table and view names in
> uppercase regardless on how they are stored in sqlite_master:
> 
> CREATE VIEW v_test AS SELECT * FROM  test_table;
> 
> will store the table in lowercase in sqlite_master (at least when
> executed through JDBC, haven't tried other ways)
> 
> DatabaseMetaData.getTables() will return the name of the view as
> V_TEST. If this value is then used to retrieve the view definition
> from sqlite_master, no rows are found: SELECT sql FROM sqlite_master
> where tbl_name = 'V_TEST'



      
____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

--~--~---------~--~----~------------~-------~--~----~
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---

Reply via email to