How to insert only five values a an ID in SQL and C#
i want to add only five subject marks for each student...how i will restrict an Stduent_ID ?if Stduent_ID=1 and inserted five times then for six entry i should not add...how i will do it in C# + SQL.

Praveen SreeramPosted Jun 23, 2016, 12:12 AM
Vinay SinghPosted Jun 23, 2016, 4:39 AM
Muhammad AamirPosted Jun 23, 2016, 4:20 AM
Praveen SreeramPosted Jun 23, 2016, 12:20 AM
Praveen SreeramPosted Jun 23, 2016, 12:17 AM
Muhammad AamirPosted Jun 23, 2016, 12:15 AM
Muhammad AamirPosted Jun 23, 2016, 12:10 AM
FROM CourseSemOne
where Student_ID=3 Group by Student_ID )
if(@Counter >= 6)
print'Sorry! You cannot add more than five subject data for a single stduent'
else
print 'Insert Query'
Praveen SreeramPosted Jun 22, 2016, 6:50 AM
Vinay SinghPosted Jun 22, 2016, 5:24 AM
Nitin SontakkePosted Jun 22, 2016, 3:57 AM