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:[EMAIL PROTECTED] 
> Sent: Thursday, January 11, 2007 11:20 PM
> To: [email protected]
> 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
> 

Reply via email to