db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Hyde" <julianh...@speakeasy.net>
Subject RE: Database ping? ('select 1'?)
Date Fri, 12 Jan 2007 18:09:31 GMT
The ANSI-compliant syntax for evaluating a scalar expression without
reference to a table is

  VALUES (1)

I don't know whether Derby supports this.

Julian 

> -----Original Message-----
> From: Ken Johanson [mailto:ken2006@kensystem.com] 
> Sent: Thursday, January 11, 2007 11:20 PM
> To: derby-user@db.apache.org
> Subject: Database ping? ('select 1'?)
> 
> This syntax:
> 
> select 1
> 
> Seems to always throw a:
> 
> SQLException: Syntax error: Encountered "<EOF>" at line 1, column 8.
> 
> Is this table-less syntax going to be supported at some 
> point, and what 
> would be the next best means to do table-less select (such as for 
> testing scalars, etc)
> 
> Of course this exmaple is also common for database connection 
> pings, in 
> systems where the connection may timeout or FIFO.. but is 
> there a better 
> (and equally efficient) approach to pinging?
> 
> I also tried `select values (1)`.
> 
> Thank you,
> Ken
> 


Mime
View raw message