Computer Science - Class 12
Solutions to CBSE Sample Paper - Computer Science Class 12

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 ;

Ask a doubt
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.