I asked Daniel, from Derby, and i got the answer that this should work in derby, with the following syntax :
INSERT INTO T(colname) VALUES DEFAULT Not sure about DB2... -- Luciano Resende http://people.apache.org/~lresende On 12/21/06, Brent Daniel <[EMAIL PROTECTED]> wrote:
At the least, DB2 and Derby do not support this. Thus, the current approach is to generate a full update rather than a partial update (pulling each field from the DataObject -- always null unless the property is a primitive.) Brent On 12/20/06, Luciano Resende <[EMAIL PROTECTED]> wrote: > I tried this with MySQL and it worked, columns with no default values were > initialized as NULL. > > -- > Luciano Resende > http://people.apache.org/~lresende > > On 12/19/06, Kevin Williams <[EMAIL PROTECTED]> wrote: > > > > Luciano, > > > > I think you are right. The best behavior may be to generate an INSERT > > statement that specifies no column values at all. Some databases will > > allow insert statements like this: > > > > INSERT INTO tableName () VALUES () > > > > But, I am not certain this is standard; we need to check. DB errors are > > likely if default values have not been specified for all columns. > > -- > > Kevin > > > > > > Luciano Resende wrote: > > > > > Hi Kevin > > > > > > My understanding is that we do not generate commands that include > > > the ID > > > when it is a generated primary key of a table, also, if you want to > > > force a > > > insert passing all fields you will loose any default column value > > > especified > > > during table creation. I think what you really want is to create a empty > > > record with the appropriae primary key on the table, and I'm trying to > > do > > > some reserch if this is possible or not. If anyone have any ideas on > > > how to > > > create a SQL command to create an empty record without specifying any > > > values > > > to the columns (e.g NULL) please let us know. > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
