Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

As you do the exercises, it is a good idea to copy/paste your query as well as y

ID: 3885837 • Letter: A

Question

As you do the exercises, it is a good idea to copy/paste your query as well as your query result into a word processor. a. Create a table called Cust with a customer number field as a fixed-length character string of 3, an address field with a variable character string of up to 20, and a numeric balance of five digits. b. Insert values in to the table with INSERT INTO . VALUES. Use the form of INSERT INTO . VALUES that requires that you to have a value for each attribute: therefore, if you have a customer number, address, and balance, you must insert three values with INSERT INTO . VALUES. c. Create at least five rows (rows in the table) with customer numbers 101 . 105 and balances of 200 to 2000. d. Display the table with a simple SELECT. From the Student-Course database, use the Student table to display the student names, classes, and majors for freshmen or sophomores (class

Explanation / Answer

2.1

CREATE TABLE Cust (
Customer_number CHAR(3) PRIMARY KEY,
Address VARCHAR(20),
balance numeric(5,2)

);

INSERT INTO Cust VALUES (101,'14-153_varahagirinagar',2000.30);
INSERT INTO Cust VALUES (102,'12/238_vizag',9000.30);
INSERT INTO Cust VALUES (101,'13-123_vijayawada',200.30);
INSERT INTO Cust VALUES (101,'1-43_varahagirinagar',4000.30);
INSERT INTO Cust VALUES (101,'17-034_beach',1800.30);

SELECT * FROM Cust;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote