Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write SQL Query Codes for this question . Please write only the sql code not the explanation or any flowchart. Thank you 3. Consider

Please write SQL Query Codes for this question . Please write only the sql code not the explanation or any flowchart. Thank you

image text in transcribed

3. Consider the following schema for Order Database: SALESMAN (Salesman_id, Name, City, Salary) CUSTOMER (Customer_id, Cust_Name, City, Salesman_id) ORDERS (Ord_No, Purchase_Amt, Ord_Date, Customer_id, Salesman_id) Write SQL queries to a. Insert 5-10 entries. b. Retrieve the details of all the customers and orders. c. Get the customers handled by a particular salesman. d. Get the details of orders purchased by customers. e. Through salesman_id retrieve the details of his sold orders. f. One of the salesmen is getting a raise of 2000 and is getting relocated to Delhi. update his data. g. Delete an order and its details as the customer placed an order and canceled it. h. Rename the City column to Place. i. Drop purchase_amt column from the table orders. j. Drop the table salesman

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions

Question

3 How the market system answers four fundamental questions.

Answered: 1 week ago

Question

5 The mechanics of the circular flow model.

Answered: 1 week ago

Question

1 The difference between a command system and a market system.

Answered: 1 week ago