Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SOL commands in a hw3.sqt file. Make sure you have set echo on in the beginning of the file. Also, spool : You are your
SOL commands in a hw3.sqt file. Make sure you have set echo on in the beginning of the file. Also, spool : You are your output to hw3.bxt. Run hw3.sql until there is no error. Turn in a print out of the hw3.txt encouraged to use comments to clearly label each question. ou should start by writing aving, and running a few commands then gradually ad more commands to your program. 1. Write an SQL command to delete a table named STUDENTS 2. Write an SQL, command to create the STUDENTS table, with the following columns SSN Lastname char( 10) Firstname char(10) Major GPA DOB charf9) char(10) number(3,2) date 3. Write SQL commands to insert the following 4 student records into the STUDENT table Major IS FN HRM iS GPA DOB 3.41 5/18/2002 3.25 3/11/2000 2.82 10/11/2001 2.78 4/4/2001 Firstname SSN 101 102 103 104 Lastname Smith Smith Meyer Brown Jim 4. Write an SQL command to display all records of the STUDENTS table. s. Write an SQL command to insert a new student record. This student's SSN is 105. Her last name is "Lee' and first name is Jamie'. Her birthday is April 1, 1983. We have no information of her major and GPA, so leave them blank 6. Write an SQL command to save all records. 7. Write an SQL command to display only the last name and first name of all students. 8. Write an SQL command to display the last name and first name of all students whose GPA is higher than 3. 9. Write an SQL command to display all columns of students whose major is not 'Is' 10. Write an SQL command to display students whose first name start with the letter 'J' and last name start with the letter "S" 11. Write an SQL command to change student I0I's major to FIN' 12. Write an SQL command to undo the change of 101's major (that is, student 101's major is still IS.) 13. Write one SQL code to change student 102's major to 'MKT' and GPA to 3.3. 14. Write an SQL command to add a new column to the STUDENTS table. The new column's name is AssOCIATION and its data type is varchar2(15). 15. Write an SQL command to enter the Association to be 'ISSa for all IS major students. 16. Write an SQL command to delete student 103's record. 17. Write an SQL code to display student records with descending order of GPA (student with the highest GPA is displayed first). 18. Write an sQL command to display students who do not have a major (major code is null). 19. 101 wants to become undeclared. Write an SQL command to make his major null 20. Write a SQL command to save all changes
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started