Write the statements to:
a. Insert the following record into the table
Roll No- 108, Name- Aadit, Sem1- 470, Sem2-444, Sem3-475, Div – I.
b. Increase the SEM2 marks of the students by 3% whose name begins with ‘N’.
Question 34(iii)(Choice 1)(a)
Answer:
INSERT INTO RESULT VALUES (108, ‘Aadit’, 470, 444, 475, ‘I’);
Explanation:
Syntax to insert a record into a table:
INSERT INTO table_name
VALUES ( value1 , value2 , value3 , ...);
Question 34(iii)(Choice 1)(b)
Answer:
UPDATE RESULT SET SEM2=SEM2+ (SEM2*0.03) WHERE SNAME LIKE “N%”;
Explanation:
Syntax to update a record:
UPDATE
table_name
SET
column1
=
value1
,
column2
=
value2
, ...
WHERE
condition
;