Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Write an insert statement to: Insert into the PROFESSOR table the professor's first name and last name James McCall, who has office number 306 in

  1. Write an insert statement to:
    1. Insert into the PROFESSOR table the professor's first name and last name James McCall, who has office number 306 in Adams building. The professor's phone number is 713-300-2010.
    2. Imagine that there is an archive table called COLLEGE_ARC. Insert all data of the COLLEGE_ARC into the COLLEGE table. Both tables have the same fields.

  1. Write data-retrieving statements for each of the following:
    1. Write an ALTER statement to add the column Rank to the PROFESSOR table. Assume that Rank is not required.
    2. Write an ALTER statement to make Phone an alternate key in COLLEGE.
    3. Write an UPDATE statement to change the city of a student with student number 101102 to 'Houston'.
    4. Write an UPDATE statement to change the phone number of a student with ID 107111 to '713-543-0011' and the state to 'TX'.
    5. Write a statement to delete all data for professor 'James McCall.'
    6. Delete all data in the COLLEGE table but keep the table structure.
    7. Write a view to select the dean's first and last name whose appointment title is "Advisor"

  1. Advanced DML.
    1. Create a user-defined function named FUNC_APPOINTMENT that combines the Title and Term of the APPOINTMENT table into a concatenated name field.
    2. Create a stored procedure that selects the student's first and last names with a certain (variable) city and state.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Java Programming, Comprehensive Version

Authors: Y. Daniel Liang

10th Edition

978-0133761313

More Books

Students also viewed these Databases questions

Question

Discuss aspects of medical sciences

Answered: 1 week ago