About Lesson
–insert into tblGender values(1,’Male’);
–insert into tblGender values(2,’Female’);
–insert into tblGender values(3,’Other’);
select * from tblGender;
–insert into tblPersons values(1,’Ram’,’ram@sircldb.com’,1);
select * from tblPersons;
–alter table tblPersons add constraint DFV_GenderId default 1 for GenderId;
–insert into tblPersons(Id,Name,Email) values(2,’Sham’,’sham@sircldb.com’);
–insert into tblPersons(Id,Email) values(3,’anil@sircldb.com’);
–alter table tblPersons alter column [Name] nvarchar(50) NOT NULL;
–update tblPersons set [Name]=’Anil’ where Id=3;
–insert into tblPersons(Id,Email) values(4,’Jatin@sircldb.com’);
–alter table tblpersons add constraint DFV_Name Default ‘No Name’ for [Name];
sp_help tblPersons;