CBSE Class 12 Informatics Practices
Question 37 of 40
Practice Paper — Question 2
Back to all questions 2
Question Kabir has created following table named exam :
| RegNo | Name | Subject | Marks |
|---|---|---|---|
| 1 | Sanya | Computer Science | 98 |
| 2 | Sanchay | IP | 100 |
| 3 | Vinesh | CS | 90 |
| 4 | Sneha | IP | 99 |
| 5 | Akshita | IP | 100 |
Help him in writing SQL queries to the perform the following task :
(i) Insert a new record in the table having following values : [6, 'Khushi', 'CS', 85]
(ii) To change the value "IP" to "Informatics Practices" in subject column.
(iii) To remove the records of those students whose marks are less than 30. ,
(iv) To add a new column Grade of suitable datatype.
(v) To display records of "Informatics Practices" subject.
(i)
INSERT INTO exam(RegNo, Name, Subject, Marks)
VALUES(6, 'Khushi', 'CS', 85);(ii)
UPDATE exam
SET Subject = 'Informatics Practices'
WHERE Subject = 'IP';(iii)
DELETE FROM EXAM
WHERE MARKS < 30 ;(iv)
ALTER TABLE EXAM
ADD COLUMN (Grade VARCHAR(1));(v)
SELECT * FROM EXAM
WHERE Subject = "Informatics Practices";