17 Aug
2007
17 Aug
'07
8:02 p.m.
On 18-08-2007 01:29:35 +0530, Pradeep Gowda wrote:
Hi, I'm trying to write SQLALchemy wrapper for MonetDB.
For the introspection part, I need a query something like this: SELECT c.name AS attname, c.type AS format_type, c.default, c.null as attnotnull, c.number as attnum, c.id AS oid FROM columns C WHERE c.table_id=9782;
Obviously, the problem with the above is, there are keywords like default, null, type etc.,
How do I make the above query work?
You can just quote them using the SQL standard quote character. E.g.: SELECT "c"."name" AS "attname", ...