Hi
I was wondering when I write an insert statement how do I leave a date field blank( Not Null Date) and also the number field (NOT NULL NUMBER) blank.
thanks,
bvg
Printable View
Hi
I was wondering when I write an insert statement how do I leave a date field blank( Not Null Date) and also the number field (NOT NULL NUMBER) blank.
thanks,
bvg
try one of these ...
SQL> create table my_table (col1 char(1),col2 number,col3 date);
Table created.
SQL> insert into my_table (col1) values ('A');
1 row created.
SQL> insert into my_table (col1,col2,col3) values ('A',null,null);
1 row created.
SQL> insert into my_table (col1,col2,col3) values ('A',to_number(null),
2 to_date(null));
1 row created.
SQL> select * from my_table;
C COL2 COL3
- ---------- ---------
A
A
A
SQL>
bvg, are the columns defined as NOT NULL? If so, you can't leave them blank . . .
thank you so much DAV and DAPI for the info.