Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
The following code would include:
SELECT P.P_DESCRIPT, P.V_CODE, V.V_NAME
FROM PRODUCT P RIGHT OUTER JOIN VENDOR V
ON P.V_CODE=V.V_CODE
Group of answer choices
A) all rows of the PRODUCT Table regardless of matches with the VENDOR Table.
B) all rows of the VENDOR Table regardless of matches with the PRODUCT Table.
C) only rows that match both PRODUCT and VENDOR Tables.
D) only rows that don't match both PRODUCT and VENDOR Tables.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- List the RTL (Register Transfer Language) sequence of micro-operations needed to execute the instructionSTORE X from the MARIE instruction set architecture. Then write the corresponding signal sequence to perform these micro-operations and to reset the clock cycle counter.arrow_forwardSELECT P.BRAND_ID, B.BRAND_NAME, B.BRAND_TYPE,MAX(AVGPRICE) FROM LGPRODUCT P INNER JOIN LGBRAND B ON P.BRAND_ID = B.BRAND_ID (SELECT P.BRAND_ID, AVG (P.PROD_PRICE) AS AVGPRICE FROM LGPRODUCT P GROUP BY P.BRAND_ID)AS AVG_PRICE GROUP BY P.BRAND_ID, B.BRAND_NAME, B.BRAND_TYPE ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT P.BRAND_ID, AVG (P.PROD_PRICE) AS AVGPRICE FROM LGPRODUCT P GROUP BY P.' at line 3arrow_forwardThree tables are given Student: studentNO, firstName, lastName, studentProgram Professor: professorID, professorProgram, professorName Student_professor: studentNO, professorID, mentor Complete the following requirements: Using the UNION operator, do a full outer join to display the student last name student program, professor name and professor program. Referring to the model created in step 2, determine the PK/FK relationships to build the SQL joining the three Create a query/subquery to display student first name, last name and program. The student program must be same as that in the professor table and the professor program name starts with a ‘C’. This query will use a subquery and not a join.arrow_forward
- 1.What is the result when the following SQL query is executed on a table named products? Choose the most correct answer. SELECT AVG(Products)FROM Products; Group of answer choices The query results in an error because the is no AVG function None of the above The query results in an error be cause a column is not specified The query returns the average of the Products table 2. If the primary key in the Employee table is located in the "ID" column what is the maximum number of results the following SQL SELECT query will return? SELECT *FROM EmployeeWHERE ID = 15; Group of answer choices 2 1 3 Do not have enough information to determine the answer 0arrow_forwardUSE this part to write SQL statements at the bottom questions 1-11 Branch(branch_id:integer, branch_name:varchar(50), branch_location:varchar(40), money_on_hand:numeric(15,2) create table Branch (branch_id integer, branch_name varchar(50), branch_location varchar(40), money_on_hand numeric(15,2), primary key (branch_id)); Loan(loan_number:integer, branch_id:integer, amount:numeric(8,2)) foreign key branch_id references Branch(branch_id) create table Loan (loan_number integer, branch_id integer, amount numeric(8,2), primary key (loan_number), foreign key (branch_id) references Branch (branch_id)); Customer(customer_id:integer, customer_last_name:varchar(35),customer_first_name:varchar(25), customer_street:varchar(30),…arrow_forwardDisplay the country names and region names where no warehouse is located in them. Use set operators to create this report and provide the exact sorting as below.arrow_forward
- write following queriesarrow_forwardGiven the following schema, answer the following questions USERS Attribute Data Type USER_ID NUMBER(3) USER_NAME VARCHAR2(20) USER_TYPE VARCHAR2(10) USER_LIMIT NUMBER(1) BOOKS Attribute Data Type BOOK_ID NUMBER(5) BOOK_TITLE VARCHAR2(25) BOOK_YEAR VARCHAR2(4) Write the SQL code that will create the tables structures for the tables named Books, and Users. Identify and include any PK and FK for both tables.arrow_forwardTopic 1: The 5 JoinsRun each of the following statements in APEX. Explain the differences in results.SELECTE.Last_Name,J.Job_TitleFROM HOL_EMPLOYEES EINNER JOIN HOL_JOBS J ON E.Job_ID=J.Job_ID;SELECTE.Last_Name,J.Job_TitleFROM HOL_EMPLOYEES ELEFT OUTER JOIN HOL_JOBS J ON E.Job_ID=J.Job_ID;SELECTE.Last_Name,J.Job_TitleFROM HOL_EMPLOYEES ERIGHT OUTER JOIN HOL_JOBS J ON E.Job_ID=J.Job_ID;SELECTE.Last_Name,J.Job_TitleFROM HOL_EMPLOYEES EFULL OUTER JOIN HOL_JOBS J ON E.Job_ID=J.Job_ID;SELECTE.Last_Name,J.Job_TitleFROM HOL_EMPLOYEES ECROSS JOIN HOL_JOBS J; DBMS 130 Worksheet: JOINS and SET Operations2Topic 2: Write an SQL cartesian product between Regions and Countries.Copy your APEX here.How many rows are in the result set?How could you have calculated the number of rows in the result set BEFORE running yourquery?Topic 3: Briefly explain how set operators handle NULL values.Run the following 3 SQL queries in APEX which use set operators over these…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education