Write an anonymous block which updates the .Physician table.(As you can not update the .Physician Table, you will have to create your own table based on the structure and contents of the Physician Table). Use named parameters to get values for Phys_ID, Phys_name, Phys_phone, and Phys_speciality. If the value for Phys_ID is in the Physician Table, Update the values of the remaining columns. If the Phys_ID is not in the Physician Table, INSERT a row into the Physician Table with those values. - Hint: Use variables for each of the columns above and assign a named parameter to each of them. Then use the variable in the rest of the block. - Write a simple driver to test the block with a Phys_ID that is in the Physician Table and a Phys_ID that is not in the Physician Table. Physician Table Phys_ID Phys_Name Phys_Phone Phys_Specialty ----------- ------------------------ ------------------ -------------------------- 101 Wilcox, Chris 512-329-1848 Eyes, Ears, Throat 102 Nusca, Janie 512-516-3947 Cardiovascular 103 Gomez, Johny 512-382-4987 Orthopedics 104 Li, Jan 512-516-3948 Cardiovascular 105 Simmons, Alex 512-442-5700 Hemotology
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
Write an anonymous block which updates the .Physician table.(As you can not update the .Physician Table, you will have to create your own table based on the structure and contents of the Physician Table). Use named parameters to get values for Phys_ID, Phys_name, Phys_phone, and Phys_speciality. If the value for Phys_ID is in the Physician Table, Update the values of the remaining columns. If the Phys_ID is not in the Physician Table, INSERT a row into the Physician Table with those values.
- Hint: Use variables for each of the columns above and assign a named parameter to each of
them. Then use the variable in the rest of the block.
- Write a simple driver to test the block with a Phys_ID that is in the Physician Table and a
Phys_ID that is not in the Physician Table.
Physician Table
Phys_ID Phys_Name Phys_Phone Phys_Specialty
----------- ------------------------ ------------------ --------------------------
101 Wilcox, Chris 512-329-1848 Eyes, Ears, Throat
102 Nusca, Janie 512-516-3947 Cardiovascular
103 Gomez, Johny 512-382-4987 Orthopedics
104 Li, Jan 512-516-3948 Cardiovascular
105 Simmons, Alex 512-442-5700 Hemotology
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
I need more details for the solution ,we dont have the physician table so we need to creat new one