datetime 2013-11-12 10:34:33.000 value
Posted by: jongse park
Date: November 11, 2013 07:11AM

How to prevent to inserting invalid values for datetime datatype?

I created a table like this;
------
create table t1 (a datetime);
and then insert values;

insert into t1 values ('2013-11-11 09:22:32');
Qeury OK, 1 row affected (0.00 sec)

But,
insert into t1 values (''2013-11-11 09:22:32.000');
Qeury OK, 1 row affected (0.06 sec)
insert into t1 values (''2013-11-11 09:22:32.012200');
Qeury OK, 1 row affected (0.07 sec)
insert into t1 values (''2013-11-11 09:22:32.01220011232132');
Qeury OK, 1 row affected (0.07 sec)

there is no error for inserting invalid datetime.
is this bug?

Please tell me. how can I prevent from inserting it?

Thanks

Options: ReplyQuote


Subject
Written By
Posted
datetime 2013-11-12 10:34:33.000 value
November 11, 2013 07:11AM


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.