Question

Add a minimum of five clients, three sales people, ten contacts, and at least one contact...

Add a minimum of five clients, three sales people, ten contacts, and at least one contact summary for each client to your database that you created in W3 Assignment 2.

Every sales person must have at least one client. Query your database to produce all the clients for one of the sales people that are assigned to multiple clients.

Produce a full client list by sales person. Add a contact summary to one of your clients, then modify it, and then delete it.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Select * from customers;

+----+----------+-----+-----------+----------+
| ID | NAME     | AGE | ADDRESS   | SALARY   |
+----+----------+-----+-----------+----------+
|  1 | Ramesh   |  32 | Ahmedabad |  2000.00 |
|  2 | Khilan   |  25 | Delhi     |  1500.00 |
|  3 | kaushik  |  23 | Kota      |  2000.00 |
|  4 | Chaitali |  25 | Mumbai    |  6500.00 |
|  5 | Hardik   |  27 | Bhopal    |  8500.00 |
|  6 | Komal    |  22 | MP        |  4500.00 |
+----+----------+-----+-----------+----------+
DECLARE 
   total_rows number(2);
BEGIN
   UPDATE customers
   SET salary = salary + 500;
   IF sql%notfound THEN
      dbms_output.put_line('no customers selected');
   ELSIF sql%found THEN
      total_rows := sql%rowcount;
      dbms_output.put_line( total_rows || ' customers selected ');
   END IF; 
END;
6 customers selected

PL/SQL procedure successfully completed.
Select * from customers;

+----+----------+-----+-----------+----------+
| ID | NAME     | AGE | ADDRESS   | SALARY   |
+----+----------+-----+-----------+----------+
|  1 | Ramesh   |  32 | Ahmedabad |  2500.00 |
|  2 | Khilan   |  25 | Delhi     |  2000.00 |
|  3 | kaushik  |  23 | Kota      |  2500.00 |
|  4 | Chaitali |  25 | Mumbai    |  7000.00 |
|  5 | Hardik   |  27 | Bhopal    |  9000.00 |
|  6 | Komal    |  22 | MP        |  5000.00 |
+----+----------+-----+-----------+----------+
DECLARE
   c_id customers.id%type;
   c_name customers.name%type;
   c_addr customers.address%type;
   CURSOR c_customers is
      SELECT id, name, address FROM customers;
BEGIN
   OPEN c_customers;
   LOOP
      FETCH c_customers into c_id, c_name, c_addr;
      EXIT WHEN c_customers%notfound;
      dbms_output.put_line(c_id || ' ' || c_name || ' ' || c_addr);
   END LOOP;
   CLOSE c_customers;
END;
/
1 Ramesh Ahmedabad 
2 Khilan Delhi 
3 kaushik Kota    
4 Chaitali Mumbai 
5 Hardik Bhopal  
6 Komal MP  
Add a comment
Know the answer?
Add Answer to:
Add a minimum of five clients, three sales people, ten contacts, and at least one contact...
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
  • I tried to complete a Java application that must include at a minimum: Three classes minimum...

    I tried to complete a Java application that must include at a minimum: Three classes minimum At least one class must use inheritance At least one class must be abstract JavaFX front end – as you will see, JavaFX will allow you to create a GUI user interface. The User Interface must respond to events. If your application requires a data backend, you can choose to use a database or to use text files. Error handling - The application should...

  • Overview: Database management plays an integral role in nearly every area of business. Databases house customer, accoun...

    Overview: Database management plays an integral role in nearly every area of business. Databases house customer, accounting, and employee data, and these different data sets must all be efficiently managed in order to make the data accessible. Companies rely on database engineers to ensure that their records are accurate, updated, and tracked in real time. This course covers structured query language (SQL) and how it can be used to manage database schemas, manipulate data, and analyze data. For your final...

  • Mashaweer is the first personal service company in Egypt. It’s purely dedicated to saving its clients’...

    Mashaweer is the first personal service company in Egypt. It’s purely dedicated to saving its clients’ time and effort by offering a personal assistant 24 hours a day. The personal assistant is a rider with a motorcycle who runs any errands for individual clients or corporations at any given time. The most common service they provide is buying groceries or other goods from stores, paying bills, and acting as a courier. Mashaweer’s success relies heavily on their flexibility, and they...

  • In Java plz due today Assignment 4 - Email, Shwitter and Inheritance Select one option from...

    In Java plz due today Assignment 4 - Email, Shwitter and Inheritance Select one option from below. All (both) options are worth the same number of points. The more advanced option(s) are provided for students who find the basic one too easy and want more of a challenge. OPTION A (Basic): Message, EMail and Tweet Understand the Classes and Problem Every message contains some content ("The British are coming! The British are coming!"). We could enhance this by adding other...

  • Showtime Sound & Lighting (SSL) Inc. is one of three small businesses owned by Tom Smith....

    Showtime Sound & Lighting (SSL) Inc. is one of three small businesses owned by Tom Smith. SSL’s line of business is centered on providing services for the local entertainment industry as well as other organizations such as civic groups and churches in need of support for large gatherings. SSL’s services range from simple DJ services to rental and sale of audio, video, and lighting equipment. Support may be provided on either a continuous or a one-time basis. SSL has noticed...

  • Bradford Consultants (BC) is a professional services firm that provides consulting services to improve business processes....

    Bradford Consultants (BC) is a professional services firm that provides consulting services to improve business processes. Many of BC services fall under the areas of organizational design, work-flow analysis, efficiency improvement, and leveraging technology to improve business outcome effectiveness. Founded over 40 years ago , BC, is similar to other firms of this type (e.g., law or accounting firms) in that the same people who sell the services are also those that do the work. As in a large law...

  • Scott Rock Consultants (SRC) is a professional services firm that provides consulting services to improve business...

    Scott Rock Consultants (SRC) is a professional services firm that provides consulting services to improve business processes. Many of SRC services fall under the areas of organizational design, work-flow analysis, efficiency improvement, and leveraging technology to improve business outcome effectiveness. Founded over 40 years ago by Wes Scott and Eli Rock, SRC, is similar to other firms of this type (e.g., law or accounting firms) in that the same people who sell the services are also those that do the...

  • Assignment 3: Introduction & Environmental Analysis, SWOT, Marketing Objectives (Goals) Marketing 4100 Directions Total Point Value:...

    Assignment 3: Introduction & Environmental Analysis, SWOT, Marketing Objectives (Goals) Marketing 4100 Directions Total Point Value: 75 points Anticipated Time to Complete: 12 hours Type of Assignment: Individual or Team Audience for Assignment: The CMO and your boss, a director-level person who relies on your evidence-supported reports to make the best decisions in a minimum amount of time. Assignment Objective: To write the marketing plan introduction as well as to collect and analyze data about the environment in which the...

  • IN JAVA PLS DUE TODAY Assignment 4 - Email, Shwitter and Inheritance Select one option from...

    IN JAVA PLS DUE TODAY Assignment 4 - Email, Shwitter and Inheritance Select one option from below. All (both) options are worth the same number of points. The more advanced option(s) are provided for students who find the basic one too easy and want more of a challenge. OPTION A (Basic): Message, EMail and Tweet Understand the Classes and Problem Every message contains some content ("The British are coming! The British are coming!"). We could enhance this by adding other...

  • 2) compute contribution margin for each channel 3) compute break even point (in terms of number...

    2) compute contribution margin for each channel 3) compute break even point (in terms of number of orders and dollars) for each distribution channel (HINT  - Fixed costs are all trade show expenses.  Use depreciation for the booth as a fixed cost.  The booth cost should be considered an investment not a fixed cost) 4) Calculate the number of orders at a target profit of $100,000 5) Calculate the profitability for both the low and high order estimates We were...

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