Question

1. (5pts) Populate your student table with 20 or more students, such that: At least 4 of them (but not all!) have the last

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Here are the queries:

To create table student with necessary attributes:


CREATE TABLE student(id INT PRIMARY KEY, firstName VARCHAR2(50), lastName VARCHAR2(50), address VARCHAR2(50), state VARCHAR2(4), gpa FLOAT, credits INT);

Inserting Values in the Table:

INSERT INTO student values( 1, 'Jessica', 'Jones', '23, High Street', 'IN', 3.95, 31);
INSERT INTO student values( 2, 'Jessica', 'Jones', 'Ghar ke piche', 'NJ', 3.7, 23);
INSERT INTO student values( 3, 'Jessica', 'Jones', 'Mohalle no 231', 'GH', 3.84, 30);
INSERT INTO student values( 4, 'Jessica', 'Jones', '23, High Street', 'IN', 2.7, 28);
INSERT INTO student values( 5, 'Vijay', 'Kholiya', 'Tigri chauraha', 'NJ', 3.69, 31);
INSERT INTO student values( 6, 'Vijay', 'James', '485 W 46th Street, New York City', 'NY', 1.0, 97);
INSERT INTO student values( 7, 'Rahul', 'James', '485 W 46th Street, New York City', 'NY', 1.69, 99);
INSERT INTO student values( 8, 'Jessica', 'James', '485 W 46th Street, New York City', 'NY', 3.7, 66);
INSERT INTO student values( 9, 'Jessica', 'Jones', '485 W 46th Street, New York City', 'NY', 3.84, 97);
INSERT INTO student values( 10, 'Jessica', 'Jones', '485 W 46th Street, New York City', 'NY', 3.69, 69);
INSERT INTO student values( 11, 'Shiwani', 'Kholiya', 'Tigri chauraha', 'NY', 2.7, 89);
INSERT INTO student values( 12, 'Ram', 'Verma', 'Tigri chauraha', 'NJ', 1.69, 82);
INSERT INTO student values( 13, 'Sheetal', 'Verma', 'Kuch Bhi Daalo', 'DE', 1.0, 78);
INSERT INTO student values( 14, 'Kala', 'Mera', 'Kahen Bhi Chale Jao', 'NJ', 3.89, 76);
INSERT INTO student values( 15, 'Ladka', 'Kutta', 'Tigri chauraha', 'NJ', 3.7, 28);
INSERT INTO student values( 16, 'Harami', 'beta', '45, Pankhe K niche', 'DE', 3.69, 37);
INSERT INTO student values( 17, 'Chutiya', 'Ladka', '45, Love street', 'NJ', 0.6, 43);
INSERT INTO student values( 18, 'Bahut', 'Bada', '23, Gone street', 'DE', 0.92, 49);
INSERT INTO student values( 19, 'Bada', 'Kuita', 'Upar wali gali', 'NJ', 3.92, 98);
INSERT INTO student values( 20, 'Kamina', 'hai', 'Ghar k niche', 'NJ', 3.3, 67);
INSERT INTO student values( 21, 'Kanu', 'Vashisth', '29, Duplec xity', 'GF', 3.7, 28);
INSERT INTO student values( 22, 'Priya', 'Samant', '34, Parathe Wali Gali', 'RE', 2.8, 20);
INSERT INTO student values( 23, 'Nicky', 'Singh', '899, No where', 'AU', 2.56, 34);
INSERT INTO student values( 24, 'Shiwani', 'Joshi', '344, Chandni CHowk', 'GF', 1.75, 88);
INSERT INTO student values( 25, 'Arti', 'Bhandari', '321, Muzzafarpur', 'YT', 0.7, 68);

Displaying the table's content:

SELECT * FROM student;

Output:

ID FIRSTNAME LASTNAME ADDRESS STATE GPA CREDITS Jessica Jones 23, High Street IN i 2 Jessica Jones Ghar ke piche 3 Jessica Jo

Add a comment
Know the answer?
Add Answer to:
1. (5pts) Populate your "student" table with 20 or more students, such that: At least 4...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT