SQL PROGRAM 2
SQL PROGRAM 2
ID_NO NUMBER(4)
S_NAME VARCHAR2(15)
SUB1 NUMBER(3)
SUB2 NUMBER(3)
SUB3 NUMBER(3)
SUB4 NUMBER(3)
SUB5 NUMBER(3)
SUB6 NUMBER(3)
1. Add records into the table for 10 students for Student ID, Student Name and marks in 6 subjects using
INSERT command.
2. Display the description of the fields in the table using DESC command.
4. Compute the RESULT as “PASSP or “FAIL” by checking if the student has scored more than 35 marks in
each subject.
1. Add records into the table for 5 students for Student ID, Student Name and marks in 6 subjects using
INSERT command.
INSERT INTO CLASS VALUES (1401, 'PAWAN', 56, 36, 56, 78, 44, 67);
2. Display the description of the fields in the table using DESC command.
DESC CLASS;
4. Compute the RESULT as “PASS”or “FAIL” by checking if the student has scored more than 35 marks in
each subject.
UPDATE CLASS SET RESULT='PASS' WHERE (SUB1>=35 AND SUB2>=35 AND SUB3>=35 AND SUB4>=35
AND SUB5>=35 AND SUB6>=35);