Search Postgresql Archives

Re: Wired behaviour from SELECT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oops!
I am putting too many hours in front of the computer, better take a break
😳

On 2024-11-22 3:12 p.m., David G. Johnston wrote:
On Fri, Nov 22, 2024 at 1:07 PM Arbol One <arbolone@xxxxxxxxxx> wrote:
The below sql statement produces the right output
SELECT nickname, password FROM password WHERE id='0938105618107N1';
  nickname   | password
-------------+----------
 Piccard@@21 |  Arbol
(1 row)
However, if this sql statement produces the wrong output
SELECT nickname, password FROM password WHERE nickname='Arbol';
 nickname | password
----------+----------
(0 rows)
What am I doing wrong?
Naming a column in your table the same name as the table is problematic generally.  As for the query, if they are both intended to return the same row the value Arbol is in the password column, not the nickname column.  You seem to have reversed the data for the two columns.

David J.

--
ArbolOne ™
Using Fire Fox and Thunderbird.
ArbolOne is composed of students and volunteers dedicated to providing free services to charitable organizations.
ArbolOne's development on Java, PostgreSQL, HTML and Jakarta EE is in progress [ í ]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux