Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

help in trigger

$
0
0
please anyone help me in this:

I have this table
-CREATE TABLE Student_test (
test_num NUMBER NULL,
correct_answer VARCHAR2(20) NULL,
stud_answer VARCHAR2(20) NULL,
grade NUMBER NULL,
CONSTRAINT STUDENT_TEST_PK PRIMARY KEY (test_num)
);

I want a trigger work after insert and add in the grade10 if correct_answer = stud_answer
else not equal add 0 in the grade


for example:
test_id|correct_answer|stud_answer|grade
001 | Japan |Japan |1
002 |China | UK |0

Viewing all articles
Browse latest Browse all 13329

Trending Articles