Add a customer: Given all necessary information add a customer to the DB can you use an exception too Feature 17: Add a customer. Input: Create a procedure with Cust_ID, Cust_name, Cust_email, Cust_street_address, Cust_city, Cust_state, Cust_Zip, Cust_Credit_Card and a cursor to store the select statement output into the cursor. Output: Creates a new row in the Customer table and displays the values with the cursor. Example of calling the feature: Exec add_customer(23, ‘James Miller’, ‘jamesmiller@gmail.com’, ‘221 Main Street’, ‘Ocean City’, ‘MD’, 28392, ‘2234 1276 2773 1728’);
Add a customer: Given all necessary information add a customer to the DB can you use an exception too Feature 17: Add a customer. Input: Create a procedure with Cust_ID, Cust_name, Cust_email, Cust_street_address, Cust_city, Cust_state, Cust_Zip, Cust_Credit_Card and a cursor to store the select statement output into the cursor. Output: Creates a new row in the Customer table and displays the values with the cursor. Example of calling the feature: Exec add_customer(23, ‘James Miller’, ‘jamesmiller@gmail.com’, ‘221 Main Street’, ‘Ocean City’, ‘MD’, 28392, ‘2234 1276 2773 1728’);
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
. Add a customer: Given all necessary information add a customer to the DB can you use an exception too
Feature 17: Add a customer.
Input: Create a procedure with Cust_ID, Cust_name, Cust_email, Cust_street_address,
Cust_city, Cust_state, Cust_Zip, Cust_Credit_Card and a cursor to store the select
statement output into the cursor.
Output: Creates a new row in the Customer table and displays the values with the cursor.
Example of calling the feature:
Exec add_customer(23, ‘James Miller’, ‘jamesmiller@gmail.com’, ‘221 Main Street’,
‘Ocean City’, ‘MD’, 28392, ‘2234 1276 2773 1728’);

Transcribed Image Text:The image is a screenshot of a database table labeled "CUSTOMERS" with the following columns: CUST_ID, CUST_NAME, CUST_EMAIL, CUST_STREET_ADDRESS, CUST_CITY, CUST_STATE, CUST_ZIP, and CUST_CREDIT_CARD_NUM. The table contains customer information such as names, email addresses, street addresses, cities, states, ZIP codes, and credit card numbers. Below is the transcribed text from the table:
1. **CUST_ID:** 21
- **CUST_NAME:** Lisa Williams
- **CUST_EMAIL:** lisawilliams@gmail.com
- **CUST_STREET_ADDRESS:** 112 Snow Avenue
- **CUST_CITY:** Buffalo
- **CUST_STATE:** NY
- **CUST_ZIP:** 10007
- **CUST_CREDIT_CARD_NUM:** 272129735432946
2. **CUST_ID:** 22
- **CUST_NAME:** Peter Smith
- **CUST_EMAIL:** petersmith@gmail.com
- **CUST_STREET_ADDRESS:** 14 2nd Street
- **CUST_CITY:** Norfolk
- **CUST_STATE:** VA
- **CUST_ZIP:** 23317
- **CUST_CREDIT_CARD_NUM:** 278347589896365
3. **CUST_ID:** 23
- **CUST_NAME:** James Miller
- **CUST_EMAIL:** jamesmiller@gmail.com
- **CUST_STREET_ADDRESS:** 221 Main Street
- **CUST_CITY:** Ocean City
- **CUST_STATE:** MD
- **CUST_ZIP:** 28392
- **CUST_CREDIT_CARD_NUM:** 2234127627731728
4. **CUST_ID:** 24
- **CUST_NAME:** Hope Davis
- **CUST_EMAIL:** hopedavis@gmail.com
- **CUST_STREET_ADDRESS:** 61 Valley Rd
- **CUST_CITY:** Washington, D.C.
- **CUST_STATE:** Washington, D.C.
- **CUST_ZIP:** 43896
- **CUST_CREDIT_CARD_NUM:** 2231395526557272
5. **CUST_ID:** 25
- **CUST_NAME:** Daisy Brown

Transcribed Image Text:The image displays a SQL code snippet used to create a database table named "Customers." Below is a transcription and explanation of the code:
```sql
CREATE TABLE Customers(
Cust_ID NUMBER NOT NULL,
Cust_Name VARCHAR2(50) NOT NULL,
Cust_Email VARCHAR2(50) NOT NULL,
Cust_Street_Address VARCHAR2(70) NOT NULL,
Cust_City VARCHAR2(50) NOT NULL,
Cust_State VARCHAR2(20) NOT NULL,
Cust_Zip NUMBER NOT NULL,
Cust_Credit_Card_Num NUMBER NOT NULL,
CONSTRAINT Customers_pk
PRIMARY KEY (Cust_ID)
);
```
### Explanation:
1. **CREATE TABLE Customers**: This command initializes the creation of a new table named "Customers" in the database.
2. **Columns**:
- `Cust_ID NUMBER NOT NULL`: A column for the customer ID, defined as a number and cannot be null.
- `Cust_Name VARCHAR2(50) NOT NULL`: A column for the customer's name, allowing up to 50 characters, and cannot be null.
- `Cust_Email VARCHAR2(50) NOT NULL`: A column for the customer's email, allowing up to 50 characters, and cannot be null.
- `Cust_Street_Address VARCHAR2(70) NOT NULL`: A column for the street address, allowing up to 70 characters, and cannot be null.
- `Cust_City VARCHAR2(50) NOT NULL`: A column for the city, allowing up to 50 characters, and cannot be null.
- `Cust_State VARCHAR2(20) NOT NULL`: A column for the state, allowing up to 20 characters, and cannot be null.
- `Cust_Zip NUMBER NOT NULL`: A column for the ZIP code, defined as a number, and cannot be null.
- `Cust_Credit_Card_Num NUMBER NOT NULL`: A column for storing the credit card number, defined as a number, and cannot be null.
3. **Constraint**:
- `CONSTRAINT Customers_pk PRIMARY KEY (Cust_ID)`: This defines a primary key constraint named "Customers_pk" on the `Cust_ID` column, ensuring each entry has a unique customer ID.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY