Write a sql query that returns the employee number

Assignment Help Database Management System
Reference no: EM132105106

Problem Set 10

1. Write a SQL query that returns the employee number, employee name, job, department number and location from the emp and dept tables.

Copy and paste your SQL code into this assignment.

2. Copy and modify the previous SQL query to use a right join to join the emp table to the dept table. What values appear in the result set now?

Copy and paste your SQL code along with your answer to the above question into this assignment.

3. Copy and paste the following SQL code into you ApEx SQL Command window:

insert into emp values(7935, 'EVE', 'MANAGER', 7839, SYSDATE, 2850, NULL, 40);

and click à Run

Re-run the SQL query created in part number 2 without making any changes to the query. How does the additional data in the table affect the result set of the query now?

Write your answer to the above question into this assignment.

4. Go to the SQL Scripts window in ApEx, which is under the SQL Workshop menu, and create a SQL file called "ps8a." Paste this SQL code into the code window and run it:

CREATE TABLE phone AS(select empno, deptno from emp);

ALTER table phone ADD(phoneNum NUMBER);

UPDATE phone set phoneNum = '8784444' where deptno = 10;

UPDATE phone set phoneNum = '8784445' where deptno = 20;

UPDATE phone set phoneNum = '8784446' where deptno = 30;

UPDATE phone set phoneNum = '8784447' where deptno = 40;

5. Create a SQL query in the SQL command window that will return the empno, enam, deptno and phone number from the emp and phone tables. You will have to join the two tables by first comparing them and decide which columns are in both tables. The phone table was created and populated with the commands above.

Copy and paste your SQL code along with your answer to the above question into this assignment.

Reference no: EM132105106

Questions Cloud

Develop a wbs and wbs dictionary : We have budgeted $150,000 for the project and have given 4 months to complete. How do I develop a WBS and WBS Dictionary for this?
Write the length of each cluster to a text file : Write the length of each cluster to a text file using the File class. Complete the analysis below two times.
Prepare advice for him citing full legal authority : Prepare advice for him citing full legal authority, as to what his legal position is - legal advice in relation to two transactions entered into by George
What is the executive summary for heinz : What is the executive summary for heinz and kraft within australia that includes success and failures
Write a sql query that returns the employee number : Write a SQL query that returns the employee number, employee name, job, department number and location from the emp and dept tables.
What is the uniform commercial code : What is the Uniform Commercial Code (UCC) responsibility concerning a contractual dispute?
Budget and get the project done with the cut specified : What if your boss says "just cut the budget and get the project done with the cut specified?" How would you handle this?
Advantages and disadvantages of practicing change control : What are some of the advantages and disadvantages of practicing Change Control?
Why do some organizations not practice change control : Why do some organizations not practice Change Control?

Reviews

Write a Review

Database Management System Questions & Answers

  Finding out the benefits of data mining to the business

the development of complex algorithms that can mine mounds of data that have been collected from people and digital

  Explain about the data warehouses and relational databases

Can you explain about the Data Warehouses and relational databases?

  Design and develop a relational database

You are required to produce a structured database design for the LCR system that will represent a blue-print/documentation for the system and create and populate the relational database for the London Car Rental System as specified in Assignment - ..

  Compose conceptual data modeling techniques

Describe the role of databases and database management systems in managing organizational data and information. Compose conceptual data modeling techniques to capture the information requirements.

  Implicit cursor to print out the mid of manager of bob

Write an anonymous PL/SQL program to compute the sum of 1, 3, 5, 7, 9. You must use a loop -  implicit cursor to print out the MID of manager of Bob.

  Which organizations do you most admire today

Describe how you think information systems are used in either type of company. Can you think of some common information systems that are necessary to either type, and different information systems that only one type or the other would have?

  Draw an entity relationship diagram for the system

Draw an Entity Relationship diagram for the system and Identify the table design for the database displaying all the fields/attributes. Ensure that all tables are in 3NF. You also need to identify the primary keys and foreign keys, where applicable..

  Discussion about database applications

Discussion about Database Applications.

  Database design morgan importing problem

Phillip Morgan, the owner of Morgan Importing, makes periodic buying trips to various countries. During the trips, he keeps notes about the items he purchases and basic data about their shipments. He hired a college student as an intern, and she t..

  Create all the relations in a microsoft access database

COIT20247 Database Design and Development - Create all the relations in a Microsoft Access database. Consider each attribute in every table

  Design a data model

Design a data model

  Show that the fundamental two-phase locking protocol

for each of these you have to give a convincing argument as to why the stated claim is true. it is not enough just to

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd