--
*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *maria s
*Sent:* Tuesday, July 29, 2008 12:07 PM
*To:* Osvaldo Rosario Kussama; pgsql-sql@postgresql.org; Pavel Stehule;
Ivan Sergio Borgonovo
*Subject:* [SQL] column names with - and (
Hi All
Hi All,
When I am fetching the data from a table,
I am giving the column names with - and ( and ) like IL-a, IL-a(p30) etc..
select x1 as IL-a, x2 as IL-a(p30) from abc
But I am getting
ERROR: syntax error at or near - and also t ( , )
Can anyone help me to fix this?
Thank you,
Maria
; Pavel Stehule ; Ivan
Sergio Borgonovo
Sent: Tuesday, July 29, 2008 5:06 PM
Subject: [SQL] column names with - and (
Hi All,
When I am fetching the data from a table,
I am giving the column names with - and ( and ) like IL-a, IL-a(p30) etc..
select x1 as IL-a, x2 as IL-a(p30) from
Stehule [EMAIL PROTECTED] ; Ivan
Sergio Borgonovo [EMAIL PROTECTED]
*Sent:* Tuesday, July 29, 2008 5:06 PM
*Subject:* [SQL] column names with - and (
Hi All,
When I am fetching the data from a table,
I am giving the column names with - and ( and ) like IL-a, IL-a(p30) etc..
select x1 as IL
, July 29, 2008 5:27 PM
Subject: Re: [SQL] column names with - and (
Maria,
The minus, open bracket and close bracket are illegal as identifier names
http://www.postgresql.org/docs/8.3/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
Best,
Oliveiros
- Original Message
, 2008 5:27 PM
*Subject:* Re: [SQL] column names with - and (
Maria,
The minus, open bracket and close bracket are illegal as identifier names
http://www.postgresql.org/docs/8.3/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
Best,
Oliveiros
- Original Message -
*From:* maria
; Pavel Stehule;
Ivan Sergio Borgonovo
Subject: [SQL] column names with - and (
Hi All,
When I am fetching the data from a table,
I am giving the column names with - and ( and ) like IL-a, IL-a(p30)
etc..
select x1 as IL-a, x2 as IL-a(p30) from abc
But I am getting
ERROR: syntax error
Hello,
there is the view columns in the schema information_schema that
can give you most of the informations you need
( for PosgreSQL version = 7.4.8 if I'm right).
SELECT *
FROM information_schema.columns
WHEREtable_name = 'mytable';
See
Hi,
Is it possible to issue an SQL query that lists column names, types (int,
varchar, boolean, etc.), properties (like NOT NULL or UNIQUE)
for a given table name ?
Regards,
Roger Tannous.
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the
Is it possible to issue an SQL query that lists column names, types (int,
varchar, boolean, etc.), properties (like NOT NULL or UNIQUE)
for a given table name ?
Start psql with the -E option. Then \d yourtable. It will print out
the queries that are run internally to show you the table
OK, I found the solution ( after a little bit of research and testing :) )
Does anyone have recommendations regarding the following query ?
SELECT pg_attribute.attname, pg_attribute.attnotnull,
pg_attribute.atthasdef, pg_type.typname, pg_attrdef.adsrc AS
default_value, pg_constraint.contype,
11 matches
Mail list logo