Suppose you have two tables: EMPLOYEE and EMPLOYEE_1. The EMPLOYEE table contains the records for three employees: Alice Cordoza, John Cretchakov, and Anne McDonald. The EMPLOYEE_1 table contains the records for employees John Cretchakov and Mary Chen. Given that information, list the query output for the UNION query.

Question
Asked Oct 8, 2019
5 views

Suppose you have two tables: EMPLOYEE and EMPLOYEE_1. The EMPLOYEE table contains the records for three employees: Alice Cordoza, John Cretchakov, and Anne McDonald. The EMPLOYEE_1 table contains the records for employees John Cretchakov and Mary Chen. Given that information, list the query output for the UNION query.

check_circle

Expert Answer

Step 1

Two tables are given named as EMPLOYEE and EMPLOYEE1. Each table has its records. EMPLOYEE table has record for three employees with their names. EMPLOYEE1 table has two records with their names. Now, a UNION command is to be applied for the two tables.  

Step 2

UNION command in SQL combines two tables with their columns. To do that, it is necessary to have same number of columns with same data types. For UNION query, two or more SELECT statements are used.

Step 3

Suppose the columns names are EmpName and Emp1Name for EMPLOYEE and EMPLOYEE1 tables respectively. Both the columns have same data type. The UNION operator here will combine the two columns from the two tables and produce ...

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.
Tagged in

Engineering

Computer Science

Databases

Related Computer Science Q&A

Find answers to questions asked by student like you
Show more Q&A
add
question_answer

Q: Are the following two clauses the same: constraint X primary key (Y, Z) and constraint X primarykey ...

A: Primary key:Primary key is a key which is used to uniquely identify a row in a table.A Primary key c...

question_answer

Q: Is the file structure of Windows 10 File Explorer or hierarchy?

A: File structure of an operating system cannot be differentiated as file explorer or hierarchy.

question_answer

Q: A bit confused on where to begin this program. I'm confused by the information I'm being given I thi...

A: In this program user wants to perform following tasks:    1.Taking inputs as a (A, B, C).     2. Cal...

question_answer

Q: The CSM Tech organization has a substantial web presence with several publicly accessible web and ap...

A: The public DNS servers are running recursive queries for both, the internal and external clients whi...

question_answer

Q: Is each of the following an absolute pathname, a relative pathname or a simple file name?a. Milk_cob...

A: Absolute path specifies the location of a directory or file from the root directory including a slas...

question_answer

Q: I can't figure out what is wrong with my assembly code it seems to error out when I add the follow l...

A: Error:The statement “movl %eax, %rdx” gives an error saying that destination operand incorrect size.

question_answer

Q: write a program in c++. You work for a box company, and have been asked to write a program to compar...

A: Click to see the answer

question_answer

Q: Hello good afternoon,   Write a C++ program that reads data from an input file, takes the data and c...

A: Program designcreate two functions for printing name, and computing and printing graderead data from...

question_answer

Q: How do repeat the cents value? For example if I use the argument cents(1234), it should print 4321 (...

A: Program Instructions:In the function reverse_int(), take a string variable word, and use it to appen...