referencing column names properly

From: "Sill-II, Stephen" <Stephen(dot)Sill-II(at)ost(dot)dot(dot)gov>
To: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: referencing column names properly
Date: 2003-02-08 23:34:31
Message-ID: 4BAE87828F06EB45B2641B83D370350F45E4@ostex002.ad.ost.dot.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have a table called logs with several columns whose names have '-' in
them, e.g. User-Name

I'm having trouble referencing these columns with SELECT statements.

What would the proper way to address these in a statement like this?

SELECT User-Name, max(Date), max(Time) from logs;

I want to return the last login date and time for each username.

Thanks
Stephen Sill II

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Roberto Mello 2003-02-09 02:15:10 Re: query help/sugestions
Previous Message James C. Ousley 2003-02-08 17:35:49 PL/Pgsql trigger function problem.