Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

jdbc: tables/columns with hypens?


  • From: mThornton@xxxxxxxxxxxx (Mark Thornton)
  • Subject: jdbc: tables/columns with hypens?
  • Date: Mon, 30 Aug 1999 17:26:00 +0100

The standard SQL syntax for that is
select "foo-1".customer from "foo-1"

Access specific version is
select [foo-1].customer from [foo-1]

One of these should work, preferably the first (assuming the JDBC driver
translates the quoting correctly).

-----Original Message-----
From: Joel Riedesel [mailto:mail21193@xxxxxxx]
Sent: 30 August 1999 15:16
To: java
Subject: jdbc: tables/columns with hypens?



(Couldn't find a jdbc list real quick, if there is one, please
point me toward it.)

Is it legal to have table or column names with hypens in them?

And if so, how does one reliably generate a query for them:

  select foo-1.customer from foo-1

I don't think hyphens are generally a good thing in SQL names, but
I've run into this particular problem when using MS Access.
(Trying to use a '\' to quote the hyphen seems to only generate a syntax
error as well...)

Thanks.

-- 
Joel Riedesel
Jnana Technologies Corporation
mailto:jriedese@xxxxxxxxx
303 805 8275