Re: complex insert
Posted by: Bill Karwin
Date: July 07, 2006 02:35PM

You have two options:

1. Use three INSERT statements with different columns listed:
insert into data_table(q1,q2) values (1,0);
insert into data_table(q1) values (1);
insert into data_table(q2) values (0);

2. Specify NULL where you mean NULL.
insert into data_table(q1,q2) values (1,0),(1,NULL),(NULL,0);
You'll have to write code in your application to convert a blank value into NULL.

Options: ReplyQuote

Written By
July 07, 2006 02:13PM
Re: complex insert
July 07, 2006 02:35PM
July 07, 2006 06:52PM
July 11, 2006 10:35AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.