I need help on below query.
Consider the Student table mentioned below
Student Name | Marks | Grade |
Brad | 92 |
|
Spence | 73 |
|
Todd | 52 |
|
Jesse | 48 |
|
Generate/Fill the Grade column based on the grade table given below. Case statements are not allowed
Range (Inclusive of both values) | Grade |
90-99 | A |
80-89 | B |
70-79 | C |
60-69 | D |
Below 60 | E |
DDL:
CREATE TABLE STUDENT(
STUDENT_NAME VARCHAR(10),
MARKS INT,
GRADE VARCHAR(10)
)
INSERT INTO STUDENT VALUES('Brad',92,'')
INSERT INTO STUDENT VALUES('Spence',73,'')
INSERT INTO STUDENT VALUES('Todd',52,'')
INSERT INTO STUDENT VALUES('Jesse',48,'')
SELECT * FROM STUDENT
Thanks:
bala krishna