217k views
4 votes
Write the necessary SQL Queries for the following

functions.
A. Adding a new Professor
B. Changing a specific Professor's Professor_Name
C. Removing a Flub by ID
D. Show a portfolio of the Flubs by a

1 Answer

2 votes

Final answer:

SQL queries are used to perform functions such as adding a new Professor, changing a Professor's name, removing a Flub by ID, and displaying a portfolio of Flubs according to specific conditions.

Step-by-step explanation:

To manage a database of Professors and Flubs, we would typically use SQL (Structured Query Language). Below are the queries for each of the specified functions:

Adding a New Professor

To add a new Professor, you would write the following SQL command:

INSERT INTO Professors (Professor_ID, Professor_Name, ...) VALUES (, '', ...);

Changing a Specific Professor's Name

To change a specific Professor's name, use the following SQL command:

UPDATE Professors SET Professor_Name = '' WHERE Professor_ID = ;

Removing a Flub by ID

To remove a Flub by ID, the SQL command would be:

DELETE FROM Flubs WHERE Flub_ID = ;

Show a Portfolio of the Flubs

If 'a' refers to a constraint to filter the Flubs, replace 'a' with the appropriate condition and use a command similar to the following:

SELECT * FROM Flubs WHERE ;
User Anup Shah
by
7.5k points