db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernd Ruehlicke" <BRuehli...@lgc.com>
Subject RE: SQL Syntax : INSERT INTO when no columns to specify
Date Tue, 05 Jul 2005 13:05:24 GMT
Hi,

I needed a similar table and had to add a dummy column to insert and
delete dummy values. I used this kind of table for a (primitive)
substitude for a global sequence generator until Derby gets one.

B-) 

> -----Original Message-----
> From: Andy [mailto:lists@ajsoft.net] 
> Sent: Tuesday, July 05, 2005 1:32 AM
> To: derby-user@db.apache.org
> Subject: SQL Syntax : INSERT INTO when no columns to specify
> 
> Hi,
> 
> I couldn't find an answer in the manual so ask here. 
> I have a table (for whatever reason) with just 1 column which 
> is defined as "generated always as identity (start with 1)"
> 
> What is the syntax for an INSERT into such a table? I can't 
> specify the column itself since it will be incremented by the 
> datastore (or can I?)
> 
> I've tried
> INSERT INTO tbl () VALUES ()
> and get 'encountered ")" at ...'
> 
> INSERT INTO tbl ()
> and get 'encountered ")" at ...'
> 
> INSERT INTO tbl
> and get 'encountered "<EOF"> at ...'
> 
> INSERT INTO tbl VALUES ()
> and get 'encountered ")" at ...'
> 
> 
> Thanks in advance
> --
> Andy
> ----------------------------------------------------------------------
> This e-mail, including any attached files, may contain 
> confidential and privileged information for the sole use of 
> the intended recipient.  Any review, use, distribution, or 
> disclosure by others is strictly prohibited.  If you are not 
> the intended recipient (or authorized to receive information 
> for the intended recipient), please contact the sender by 
> reply e-mail and delete all copies of this message.
> 
----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information
for the sole use of the intended recipient.  Any review, use, distribution, or disclosure
by others is strictly prohibited.  If you are not the intended recipient (or authorized to
receive information for the intended recipient), please contact the sender by reply e-mail
and delete all copies of this message.

Mime
View raw message