Not Null:
Not Null is a domain integrity.
It ignores Null Values.
Syntax:
create table course345( CId Number, CName varchar(20), gender char(1) Not null);
Table Created
insert into course345 values(1,'parthi','m');
insert into course345 values(2,'karthi','m');
Two Rows Created
insert into course345 values(1,'arthi',null);
When run this above query its redirect to the below error
ORA-01400: cannot insert NULL into ("HR"."COURSE345"."GENDER")
Not Null is a domain integrity.
It ignores Null Values.
Syntax:
create table course345( CId Number, CName varchar(20), gender char(1) Not null);
Table Created
insert into course345 values(1,'parthi','m');
insert into course345 values(2,'karthi','m');
Two Rows Created
insert into course345 values(1,'arthi',null);
When run this above query its redirect to the below error
ORA-01400: cannot insert NULL into ("HR"."COURSE345"."GENDER")
No comments:
Post a Comment