Query a column with the same name as an operator

From: Java Developer <java(at)wagemaker(dot)co(dot)uk>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Query a column with the same name as an operator
Date: 2020-11-06 08:59:31
Message-ID: b8dc10ca1d9148f271b557f872062a9af68c19da.camel@wagemaker.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I am trying to query a column from a table I migrated from my MYSQL
into POSTGRESQL but I seem to be having issues with a few column names.

the column name cast is also an operator, I think zone may also be a
problem.

MYSQL: OK
SELECT id, start_date, local_time, country, city, region, temperature,
cast, humidity, wind, weather, zone FROM w_records WHERE city =
'Edinburgh' AND start_date LIKE '%2020-11-01%' ORDER BY id DESC;

I can run the SELECT * from FROM w_records WHERE city = 'Edinburgh' but
the above does not work.

Any idea how I can run a query that accept table name that is already a
Operator?

Many Thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2020-11-06 09:08:50 Re: Query a column with the same name as an operator
Previous Message Laurenz Albe 2020-11-06 08:37:09 Re: how to check that recovery is complete