uday0097 / SQLAssignmentsSubmission

Here you can submit your SQL Assignments answers
0 stars 0 forks source link

Assignment: Constraints in SQL Server #3

Open kanchanpal710 opened 6 months ago

kanchanpal710 commented 6 months ago

create table students_contraints(student_id int not null,firstname varchar(8) not null,lastname varchar(8)not null,age int check(age<=18 and age>=30),gender varchar (8),grades varchar(5));

insert into students_contraints(student_id,firstname,lastname,age,gender,grades) values(7032,'akansha','karotiya',13,'f','B'); insert into students_contraints(student_id,firstname,lastname,age,gender,grades) values(7033,'Amit','Raj',12,'M','A'); insert into students_contraints(student_id,firstname,lastname,age,gender,grades) values(7034,'Priyanka','Kashyap',14,'f','C'); insert into students_contraints(student_id,firstname,lastname,age,gender,grades) values(7035,'Rishita','Bhatt',15,'f','A'); insert into students_contraints(student_id,firstname,lastname,age,gender,grades) values(7036,'Ankit','Verma',30,'M','C'); insert into students_contraints(student_id,firstname,lastname,age,gender,grades) values(7036,'Ankit','null',17,'M','C');

uday0097 commented 6 months ago

Good keep going