Search Postgresql Archives

Re: Inserting boolean types as an alias?

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

 



On Mon,  2 Dec 2013 15:46:17 -0800, Nick wrote:
[...]
> This is what I have currently for the line that I am specifically talking
> about:
> 
> INSERT INTO club_Games(memberID, gameID, hardwareID, count, status)
> 	 VALUES	((SELECT memberID FROM members WHERE name = 'Fred Flinstone'),
> (SELECT gameID FROM games WHERE name = 'Jurrasic Park'), NULL, 1, 'true');
> 
> when I do the SELECT * FROM club_Games this is my output:
> 
> id     gameid        memberid      hardwareid            count         
> status
> 1   12345zzzzz       A12345           <null>               1                 
> t    
> 
> Where it says t for status I wanted it to say available but mean true for
> boolean, but I don't know how to do that. Thanks to all for help.

Alternate suggestion: If you want to use a boolean column here,
maybe you could consider naming the column "available", not "status".

id     gameid        memberid      hardwareid    count     available
1      12345zzzzz    A12345        <null>        1         t    

-- 
Michał Politowski
Talking has been known to lead to communication if practiced carelessly.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[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 Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux