Identify the choice that best completes the statement

Assignment Help PL-SQL Programming
Reference no: EM13330306

Identify the choice that best completes the statement or answers the question.

1. To indicate which database table contains the data to be selected by a query, the table name should be listed in the ____ clause.
a. SELECT c. WHERE
b. FROM  d. HAVING

2. Based upon the contents of the BOOKS table, which of the following is a valid SQL statement?
a. SELECT "The retail price of " || title || " is " retail FROM books;
b. SELECT * || is currently in our inventory FROM books;
c. SELECT title, || retail "Price" FROM books;
d. SELECT isbn || CHR(10) || title FROM books;

3. Based upon the contents of the BOOKS table, which of the following SQL statements will display the retail price for two copies of each book currently in inventory?
a. SELECT * FROM books;
b. SELECT title, retail+retail FROM books;
c. SELECT title, retail^2 FROM books;
d. none of the above

4. Which of the following operators can be used to retrieve rows containing NULL values in a specific column?
a. = c. NOT
b. LIKE d. none of the above

 

5. Which of the following operators can be used to retrieve rows containing NULL values in a specific column?
a. = c. NOT
b. LIKE d. none of the above

6. Based upon the contents of the BOOKS table, which of the following SQL statements will retrieve all books published by the publisher assigned Pubid 1?
a. SELECT * FROM books WHERE pubid LIKE "1";
b. SELECT * FROM books WHERE pubid = 1;
c. SELECT * FROM books WHERE pubid > 1;
d. both a and b

7. Which of the following queries will display all orders that were not shipped for at least three days after the order was received?
a. SELECT * FROM orders WHERE shipdate-orderdate => 3;
b. SELECT * FROM orders WHERE shipdate-orderdate >= 3;
c. SELECT * FROM orders WHERE NOT shipdate-orderdate => 3;
d. SELECT * FROM orders WHERE NOT shipdate-orderdate >= 3;

8. Based upon the contents of the ORDERS table, which of the following SQL statements will display the number of days between the date an order was placed and the date it was shipped?

a. SELECT order#, TO_CHAR(shipdate-orderdate, '99') FROM orders WHERE shipdate IS NOT NULL;
b. SELECT order#, MONTHS_BETWEEN(shipdate-orderdate, '99') FROM orders WHERE shipdate IS NOT NULL;
c. SELECT order#, ADD_MONTHS(shipdate-orderdate, '99') FROM orders WHERE shipdate IS NOT NULL;
d. SELECT order#, DAYS_BETWEEN(shipdate-orderdate, '99') FROM orders WHERE shipdate IS NOT NULL;

9. Based upon the contents of the ORDERS table, which of the following SQL statements will display only those orders shipped to the zip code zone that begins with 323?
a. SELECT order#, SUBSTR(shipzip, 1, 323) FROM orders;
b. SELECT order#, SUBSTR(shipzip, 1, 323) FROM orders WHERE shipzip = 323;
c. SELECT order# FROM orders WHERE shipzip = SUBSTR(shipzip, 1, 323);
d. SELECT order# FROM orders WHERE SUBSTR(shipzip, 1, 3) = 323;

Reference no: EM13330306

Questions Cloud

Marketing multimillion-dollar waste water treatment systems : A firm that is marketing multimillion-dollar wastewatertreatment systems to cities has been unable to sell a new type ofsystem. This setback has occurred even though the firm’ssystems are cheaper than competitive systems and meet U.S.Environmental Pr..
Pension funds and financial planning : 1. What role do you think insurance companies play when it comes to pension funds and financial planning?
Explain sodium acetate predict how much acid will required : If a buffer is made up to be 1.0 M in acetic acid and 1.0 M in sodium acetate predict how much acid will be required to change the pH of 100 mL of the buffer by 0.1 pH units
Calculate the peak output voltage of a simple generator : Calculate the peak output voltage of a simple generator whose square armature windings are 5.50 cm on a side
Identify the choice that best completes the statement : Based upon the contents of the BOOKS table, which of the following SQL statements will display the retail price for two copies of each book currently in inventory?
Engagement related to the system development : Establish a separate department that will provide internal audit service to his audit clients - Discuss whether you feel auditor should be allowed to provide non audit services to their audit client.
Find to be most beneficial to evaluate this risk : In order to minimize this risk, what steps can an investor take? More specifically, what would we call this action or activity?
Find the total kinetic energy increase in the process : An unstable atomic nucleus of mass 1.60 10-26 kg initially at rest disintegrates into three particles. One of the particles, of mass 5.02 10-27 kg, Find the total kinetic energy increase in the process
Organizational purpose and goals-consumer behavior : If you were the project manager for Harley-Davidsonprior to its entering China, what information would you haveprovided to the board of directors to lead to the decision to enterChina?

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

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