public inbox for [email protected]  
help / color / mirror / Atom feed
From: David Mullineux <[email protected]>
To: David G. Johnston <[email protected]>
Cc: Arbol One <[email protected]>
Cc: pgsql-general <[email protected]>
Cc: PostGreSQL MailingList <[email protected]>
Subject: Re: Wired behaviour from SELECT
Date: Fri, 22 Nov 2024 23:55:30 +0000
Message-ID: <CAGsyd8WU_FsAJ-DJ0+54iBoJKRWTfVphShHVSig8hcz=7pi4aA@mail.gmail.com> (raw)
In-Reply-To: <CAKFQuwahNdTb3kHWyDGnxkTqD3oH18tS597y3WKv8UdNz5-xhw@mail.gmail.com>
References: <BYAPR12MB280818626E29A0CBC38DAEAABA232@BYAPR12MB2808.namprd12.prod.outlook.com>
	<CAKFQuwahNdTb3kHWyDGnxkTqD3oH18tS597y3WKv8UdNz5-xhw@mail.gmail.com>

Instead of nickname you probably want tontet where password=`Arbol'  ..  or
am.i.missong something ?.

On Fri, 22 Nov 2024, 20:13 David G. Johnston, <[email protected]>
wrote:

> 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], [email protected]
  Subject: Re: Wired behaviour from SELECT
  In-Reply-To: <CAGsyd8WU_FsAJ-DJ0+54iBoJKRWTfVphShHVSig8hcz=7pi4aA@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