-- Drop the existing table if it exists
DROP TABLE Student_list;
-- Create a new table named "Student_list" with columns "roll_no" and "stu_name"
CREATE TABLE Student_list (
roll_no NUMBER,
stu_name VARCHAR2(30)
);
-- Insert records into the table
INSERT INTO Student_list (roll_no, stu_name) VALUES (1, 'KING');
INSERT INTO Student_list (roll_no, stu_name) VALUES (1, 'KING');
INSERT INTO Student_list (roll_no, stu_name) VALUES (2, 'BLAKE');
INSERT INTO Student_list (roll_no, stu_name) VALUES (3, 'CLARK');
INSERT INTO Student_list (roll_no, stu_name) VALUES (4, 'JONES');
INSERT INTO Student_list (roll_no, stu_name) VALUES (5, 'SCOTT');
INSERT INTO Student_list (roll_no, stu_name) VALUES (5, 'SCOTT');
INSERT INTO Student_list (roll_no, stu_name) VALUES (6, 'RAGHU');
INSERT INTO Student_list (roll_no, stu_name) VALUES (7, 'FORD');
INSERT INTO Student_list (roll_no, stu_name) VALUES (7, 'FORD');
INSERT INTO Student_list (roll_no, stu_name) VALUES (8, 'SMITH');
INSERT INTO Student_list (roll_no, stu_name) VALUES (9, 'ALLEN');
INSERT INTO Student_list (roll_no, stu_name) VALUES (10, 'WARD');
-- Commit the changes
COMMIT;
-- Retrieve all records from the table, ordered by roll number and student name
SELECT *
FROM Student_list
ORDER BY roll_no, stu_name;