Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL Short Questions: Answer each question using just ONE word. (5 points e/a) 1. Which SQL statement is used to add rows to a table?

SQL
image text in transcribed
Short Questions: Answer each question using just ONE word. (5 points e/a) 1. Which SQL statement is used to add rows to a table? 2. Given an employee table as follows: (empid name managerid) and the next tuples: a1 bob NULL, b1 jim a1, 82 tom a1. What value will select count(") from employee return? 3. ANULL value is treated as a blank or . True or false? 4. In a select with a group by clause, a where clause, and a having clause, the where conditions are applied before the having conditions. True or false? 5. A primary key may contain NULLS. True or false? 6. What operator is used to add a column to a table? 7. To remove duplicate rows from the resuit set of a select, what keyword is used? Dinstret Questions 8 and 9 : ( 5 points e/a) All queries refer to a schema containing two relations: R(A,B) where A,B is a key S(A,B) where A is a key You may assume that the relations do not contain NULL values, but do not make any other assumptions about the relations. Next two questions are summarized in the following table. Write "YES" or "NO" if the queries are equivalent: Question 10: (10 points) Consider the relation: List(element, position). Assume that element takes integer values only (no NULLs allowed). You can also assume the relation contains an odd number of tuples. Assume that element takes distinct values. The next query represents?: SELECT element FROM List L1. WHERE (SELECT COUNT( ) FROM LIst WHERE element L1.element); (a) The mode of list (b) Similar positions in list (c) The median in element (d) Identical elements in List

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

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions