public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: Arbol One <[email protected]>
Cc: [email protected] <[email protected]>
Cc: PostGreSQL MailingList <[email protected]>
Subject: Re: Wired behaviour from SELECT
Date: Fri, 22 Nov 2024 13:12:46 -0700
Message-ID: <CAKFQuwahNdTb3kHWyDGnxkTqD3oH18tS597y3WKv8UdNz5-xhw@mail.gmail.com> (raw)
In-Reply-To: <BYAPR12MB280818626E29A0CBC38DAEAABA232@BYAPR12MB2808.namprd12.prod.outlook.com>
References: <BYAPR12MB280818626E29A0CBC38DAEAABA232@BYAPR12MB2808.namprd12.prod.outlook.com>
On Fri, Nov 22, 2024 at 1:07 PM Arbol One <[email protected]> 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.
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Wired behaviour from SELECT
In-Reply-To: <CAKFQuwahNdTb3kHWyDGnxkTqD3oH18tS597y3WKv8UdNz5-xhw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox