On 15-11-2007 12:13:56 -0700, m h wrote:
Hi all,
Hi Matt ;)
I'm trying to reflect tables (to create a sqlalchemy backend for monetdb). I need to reflect the tables to do that and need primary keys.
This information is stored in keycolumns, yet I can't seem to get the column out by itself.
sql>select * from keycolumns; +------+--------+------+---+ |id |column |trunc |nr | +======+========+======+===+ |4394 |vendnum | 0 | 0 | |4393 |vendnum | 0 | 0 | +------+--------+------+---+ Timer 1.750 msec 2 rows sql>select column from keycolumns; !syntax error, unexpected COLUMN in: "select column" Timer 0.163 msec 0 rows sql>select keycolumns.column from keycolumns; !syntax error, unexpected COLUMN in: "select keycolumns.column"
You need to quote the column names, so the SQL parser knows you mean a column, e.g. select "column" from "keycolumns";