please do the work dont copy/paste.
i will give a thumbs up
SQL > CREATE TABLE Students ( z_no NUMBER, name VARCHAR2 (50), age NUMBER, PRIMARY KEY (z_no)); Add an attribute (column) SQL > ALTER TABLE Students ADD gpa real; Insert a student: SQL > INSERT INTO Students(z_no, name, age, gpa) VALUES (1122334, 'Tom Jones', 24, 4.0); Insert a student: SQL > INSERT INTO Students (z_no, name, age, gpa) VALUES (1122335, 'Smith', 21, 3.6); Insert a student: --(will not allow to insert 2 with the identical Primary Key) SQL > INSERT INTO Students(z_no, name, age, gpa) VALUES (1122335, 'Gordon', 38, 2.5); Find all the students: SQL> SELECT * FROM Students; Remove a student: SQL>DELETE FROM Students WHERE z_no = 1122335; Remove all students: SQL>DELETE FROM students; Insert a student: SQL> INSERT INTO Students (z_no, name, age, gpa) VALUES (1122334, Tom Jones', 24, 4.0);
Insert a student: SQL> INSERT INTO Students (z_no, name, age, gpa) VALUES (1122335, 'Smith', 21, 3.6); Insert a student: SQL > INSERT INTO Students (z_no, name, age, gpa) VALUES (1122336, 'Gordon', 38, 2.5); Update: SQL > UPDATE Students SET gpa gpa + .5 WHERE z no 1122336; Update: SQL> UPDATE Students SET name 'Popcorn', age 85 WHERE z_no=1122336; Print the entire student table: SQL> SELECT * FROM students;
please do the work dont copy/paste. i will give a thumbs up
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am