1 create table aa
2 (
3 a1 varchar2(20)
4 );
5
6
7 insert into aa
8 values('2010-9-02');
9
10 insert into aa
11 values(to_date('2010/09/22','YYYY/MM/DD'));
1215
16 select * from aa;
17
18 create table bb
19 (
20 a1 date
21 );
22
23
24 insert into bb
25 values(to_date('2010/09/22','YYYY/MM/DD'));
26
27
28 insert into bb
29 values('2010-9-02');
30 类型不一致,需要进行转换。最好定义为varchar2型的,易进行插入。
33
34
35 select * from bb;