Question

ONLY ODD NUMBERS. YOU MUST USE ORACLE OR MY SQL.

THANKS

Chapter 3 TAL Distributors Use SQL to complete the following exercises 1. Create a table named SALES_ REP. The table has the same structure as the REP table shown in Figure 3-11 except the LAST_NAME column should use the VARCHAR data type and the COMMISSION and RATE columns should use the NUMBER data type. Execute the command to describe the layout and characteristics of the SALES_REP table. Add the following row to the SALES_REP table: rep number: 35, last name: Lim; first name: Louise; street: 535 Vincent Dr.; city: Grove; state: CA; postal code: 90092; com- mission: 0.00; and rate: 0.05. Display the contents of the SALES_REP table. 0 2. 3. Delete the SALES REP table 4. Run the script file for the TAL Distributors database to create the five tables and add records to the tables. Be sure to select the script file for the particular DBMS that you are using (Oracle, SQL Server, or Access). (Note: If you do not have the script files for this text, ask your instructor for assistance.) Confirm that you have created the tables correctly by describing each table and compar ing the results to Figures 3-11, 3-30, 3-32, 3-34, and 3-36 Confirm that you have added all data correctly by viewing the data in each table and comparing the results to Figure 2-1 in Chapter 2. Review the data for the ITEM table in Figure 2-1 in Chapter 2 and then review the data types used to create the ITEM table in Figure 3-34. Suggest alternate data types for the DESCRIPTION, ON HAND, and STOREHOUSE fields and explain your recommendations. 5. 6. C RITICAL7. THINKINGThe SQL command that creates the REP table is shown in Figure 3-11. CREATE TABLE REP (REP NUM CHAR (2) PRIMARY KEY Creates a tableLAST NAME CHAR (15), FIRST-NAME CHAR (15), STREET CHAR (15), CITY CHAR(15) STATE CHAR(2) POSTAL_CODE CHAR(5) COMMISSION DECIMAL ( 7 , 2 ) , RATE DECIMAL (3,2) named REP Command continues over several lines Semicolon indicates end of command

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

This demonstration is using Oracle.

1.Table Name :SALES_REP

SQL Script :

create table SALES_REP(
SALESREP_NUM char(2) Primary key,
LAST_NAME varchar(20) ,
FIRST_NAME char(15),
STREET CHAR(15) ,
CITY CHAR(15),
STATE CHAR(2),
POSTAL_CODE char(5),
COMISSION number(7,2),
RATE number(3,2)
);

Screen in Oracle :

Oracle Live SQL-SQL Worksheet × ぐ→ 숲 https://livesql.oracle.com/apex/f?p:590:1-1126559561 384.. ☆ o Oo ORACLE Live SQL Feedback Help SQL Worksheet Clear ActionsB Save Run 1 create table SALES REP 2 SALESREP_NUM char (2) Primary key, 3 LAST_NAME varchar (20), 4 FIRST_NAME char (15) 5 STREET CHAR (15) , 6 CITY CHAR(15), 7 STATE CHAR (2), 8 POSTAL_CODE char(5), 9 COMISSION number(7,2), 10 RATE number(3,2) 品 Table created.

Question 2 :

SQL Script :

Insert into SALES_REP values
(35,'Lim','Louise','535 Vincent Dr','Grove','CA','90092',0.00,0.05);

Screen in Oracle :

select * from SALES_REP;

Oracle Live SQL-SQL Worksheet + ← → 숲 https://livesql.oracle.com/apex/f?p:590:1-1126559561 384.. ☆ ゜゜゜ ORACLE Live SQL Feedback ⑦ Help Clear ActionsB Save Run SQL Worksheet 1 select * from SALES_REP; SALESREP NUM LAST NAME FIRST NAME STREET CITY STATE POSTAL_CODE COMISSION RATE 535 Vincent Grove CA 次一 35 Lim Louise 98092 .05 Download CSV 品

Question 3 :

SQL Script :

drop table SALES_REP;

Screen in Oracle :

Oracle Live SQL-SQL Worksheet × ぐ→ 슐 https://livesql.oracle.com/apex/f?p=590:1:1126559561 3848.. ☆゜゜゜ ORACLE Live SQL Feedback Help SQL Worksheet &Clear Actions ﹀ E) Save Run 1 drop table SALES_REP; Table dropped.

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Add a comment
Know the answer?
Add Answer to:
ONLY ODD NUMBERS. YOU MUST USE ORACLE OR MY SQL. THANKS Chapter 3 TAL Distributors Use...
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
  • Oracle 12c SQL - Chapter 5: Case Study: City Jail, Part II Note: You are limited...

    Oracle 12c SQL - Chapter 5: Case Study: City Jail, Part II Note: You are limited to using the Oracle Live interface to create solutions for the problems below. SQL Live does not allow as many commands, statements, and symbols as full Oracle SQL. Specifically, the ampersand substitution variable symbol (&) may not be used for any of the solutions below because Oracle Live does not recognize it. Oracle Live is available to use here: https://livesql.oracle.com/apex/f?p=590:1000 Execute the CityJail_5.sql script...

  • A guide to SQL 9th edition Colonial Adventure Tours chapter 3 page 90-92 Odd numbered exercises...

    A guide to SQL 9th edition Colonial Adventure Tours chapter 3 page 90-92 Odd numbered exercises only figure 3-39(Guide, trip, customer, reservation and Trip_Guides) figure 1-5 chapter 1: 7. Review me on TUI UTILIVUDIJ types used to create the ITEM table in Figure 3-34. Suggest alternate data types for the DESCRIPTION, ON HAND. and STOREHOUSE fields and explain your recommendation Colonial Adventure Tours Use SQL to complete the following exercises 1. Create a table named ADVENTURE TRIP. The table has...

  • We are using, Oracle Database 11g Express Edition. use SQL and the TAL Distrutors database (see...

    We are using, Oracle Database 11g Express Edition. use SQL and the TAL Distrutors database (see figure 1-2 in chapter 1) to complete the following exercises. if directed to do so by your instructor, use the information provided with the chapter 3 exercises to print your output or save it to a document. 1. list the item number, description, and price for all items. 2. list all rows and columns for the complete ORDERS table. 3. list the names of...

  • Create a FUNCTION that will print out an address label for the TAL Distributors database using the Customer table. You c...

    Create a FUNCTION that will print out an address label for the TAL Distributors database using the Customer table. You can specify the customer table to output the address. Here is an example of the output expected: Toys Galore    28 Laketon St.    Fullton, CA 90085 The database name is "TAL Distributors" and images of all the tables have been attached. Please double check that function executes before answering. Customer Table: SQLQueryl.sgl . (L (SOM.Jonesl58 (54)) × SELECT TOP (1000) [Customer-Num]...

  • im currently working on an sql database homework for a fundamentals class but im not too...

    im currently working on an sql database homework for a fundamentals class but im not too sure if my results are alright and would like to compare results, the assignment is as follows: O4pk,fk evaluate de data models, the specifications and table contents: equipment_tb Assigned_Equipment_tb workers_tb pk serial_number int pk,fk serial number int pk worker_id int, Surrogate brand char(10) worker id int Lastname char(100) model char(15) assigned_date date Firstname char(50) processor char(15) department int processor_velocity number (3,2) email char(200) memory...

  • SQL problem solving help; First 3 tables are finnished; Need help understanding on how to do...

    SQL problem solving help; First 3 tables are finnished; Need help understanding on how to do steps after. First 3 tables are after the first 2 images for reference if needed. //1// CREATE TABLE kr_customer ( Name VARCHAR(40) NOT NULL PRIMARY KEY, City VARCHAR(20), Status CHAR(1) ); //2// CREATE TABLE kr_salesperson ( Name VARCHAR(40) NOT NULL PRIMARY KEY, Age INT, Salary DECIMAL(8, 2) ); //3// CREATE TABLE kr_order ( Order_Number number(3) NOT NULL PRIMARY KEY, Customer_Name VARCHAR(40), Salesperson_Name VARCHAR(40), Amount...

  • Oracle 12c: SQL   Joan Casteel ISBN: 978-1-305-25103-8 Chapter 12 Case Study: City Jail Make sure you...

    Oracle 12c: SQL   Joan Casteel ISBN: 978-1-305-25103-8 Chapter 12 Case Study: City Jail Make sure you have run the CityJail_8.sql script from Chapter 8. This script makes all database objects available for completing this case study. The city's Crime Analysis unit has submitted the following data requests. Provide the SQL statements using subqueries to satisfy the requests. Test the statements and show execution results. Use a sql sub-query statement to answer the following: (Please provide correct answer for questions 6...

  • CIS 411w spring 2017 Problem Set 11    1 Log in to your Oracle ApEx account....

    CIS 411w spring 2017 Problem Set 11    1 Log in to your Oracle ApEx account. 2. Create a new table called email with this command: CREATE table email as (SELECT empno, ename||'.'||SUBSTR(JOB,1,2)||'@apex.com' as "EMAIL" from emp); Click à Run to create this table 3. Write a SQL query that JOINS the three tables emp,dept and email. This SQL query will return the empno, ename, job, sal, loc and email for each employee. Use the newer ANSI JOIN syntax rather...

  • [IN SQL] New to working in SQL and I need to make a database called HAFH....

    [IN SQL] New to working in SQL and I need to make a database called HAFH. I am trying to create tables for the database with the information from the photo above but having issues. I am looking for the syntax that successfully creates these tables, and references each other. I know each table has to be made in a specific order, and that is what I am struggling with. INSPECTOR InsID InsName INSPECTING InsID (FK) BuildingID (FK) Date Last...

  • Chapter 2 How to use the Management Studio Before you start the exercises... Before you start...

    Chapter 2 How to use the Management Studio Before you start the exercises... Before you start these exercises, you need to install SQL Server and the SQL Server Management Studio. The procedures for doing both of these tasks are provided in appendix A of the book. In addition, you'll need to get the Exercise Starts directory from your instructor. This directory contains some script files that you need to do these exercises. Exercises In these exercises, you'll use SQL Server...

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
ADVERTISEMENT