db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <derby-...@db.apache.org>
Subject [jira] Resolved: (DERBY-602) SELECT statement does not return the first colum data correctly
Date Wed, 05 Oct 2005 13:44:01 GMT
     [ http://issues.apache.org/jira/browse/DERBY-602?page=all ]
Rick Hillegas resolved DERBY-602:

    Resolution: Fixed

This is expected behavior. USER is a builtin system function which returns the authorization
id of the current user. Please see the "Built-in functions" section of the Derby Reference

Note that you can create a column named USER only by double quoting it (called a 'quoted identifier'
in SQL-speak). When referencing such a column in queries, you should always double quote the
column name. The following query will return the results you want:

select "USER", "PASSWORD" from USERS;

> SELECT statement does not return the first colum data correctly
> ---------------------------------------------------------------
>          Key: DERBY-602
>          URL: http://issues.apache.org/jira/browse/DERBY-602
>      Project: Derby
>         Type: Bug
>     Versions:
>  Environment: Win XP, Sun JDK 142
>     Reporter: Vamsavardhana Reddy

> SELECT statement does not return the first colum data correctly.  Here is the scenario.
 I have used "ij" for executing SQL.
> I have used the EmbeddedDriver and created a database.   JDBC URL: 'jdbc:derby:mydb;create=true'
> I have created one table using the SQL given below:
> I have inserted one row into this table using the SQL given below:
>    INSERT INTO USERS VALUES ('user1', 'password1');
> Retrieving  rows from this table using the SQL statement "SELECT * FROM USERS"  returns
the data properly.  Where as "SELECT USER, PASSWORD FROM USERS" retuns a value 'APP' for USER
column data.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message